mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
Merge pull request #935 from harshavardhana/fs-bucket
On windows translate Prefix, Marker and Delimiter for paths
This commit is contained in:
commit
dbe3d9489e
@ -220,10 +220,10 @@ func (fs Filesystem) ListObjects(bucket string, resources BucketResourcesMetadat
|
|||||||
|
|
||||||
p.root = rootPrefix
|
p.root = rootPrefix
|
||||||
/// automatically treat "/" delimiter as "\\" delimiter on windows due to its path constraints.
|
/// automatically treat "/" delimiter as "\\" delimiter on windows due to its path constraints.
|
||||||
if resources.Delimiter == "/" {
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
resources.Delimiter = string(os.PathSeparator)
|
resources.Prefix = strings.Replace(resources.Prefix, "/", string(os.PathSeparator), -1)
|
||||||
}
|
resources.Delimiter = strings.Replace(resources.Delimiter, "/", string(os.PathSeparator), -1)
|
||||||
|
resources.Marker = strings.Replace(resources.Marker, "/", string(os.PathSeparator), -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if delimiter is supplied and not prefix then we are the very top level, list everything and move on.
|
// if delimiter is supplied and not prefix then we are the very top level, list everything and move on.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user