mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
s3cmd: Fix signature issues related to s3cmd.
Support regions both 'us-east-1' and 'US' (short hand for US Standard) honored by S3.
This commit is contained in:
@@ -100,10 +100,19 @@ func (fs Filesystem) ListObjects(bucket string, resources BucketResourcesMetadat
|
||||
FileInfo: fl,
|
||||
})
|
||||
} else {
|
||||
files, err := ioutil.ReadDir(filepath.Join(rootPrefix, resources.Prefix))
|
||||
var prefixPath string
|
||||
if runtime.GOOS == "windows" {
|
||||
prefixPath = rootPrefix + string(os.PathSeparator) + resources.Prefix
|
||||
} else {
|
||||
prefixPath = rootPrefix + string(os.PathSeparator) + resources.Prefix
|
||||
}
|
||||
files, err := ioutil.ReadDir(prefixPath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return nil, resources, probe.NewError(ObjectNotFound{Bucket: bucket, Object: resources.Prefix})
|
||||
switch err := err.(type) {
|
||||
case *os.PathError:
|
||||
if err.Op == "open" {
|
||||
return nil, resources, probe.NewError(ObjectNotFound{Bucket: bucket, Object: resources.Prefix})
|
||||
}
|
||||
}
|
||||
return nil, resources, probe.NewError(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user