mirror of
https://github.com/minio/minio.git
synced 2024-12-25 14:45:54 -05:00
Merge pull request #249 from harshavardhana/pr_out_pathprefix_is_filtered_out_properly_and_delimited_as_well
This commit is contained in:
commit
df135d7307
@ -404,12 +404,13 @@ func (storage *storage) ListObjects(bucket string, resources mstorage.BucketReso
|
|||||||
resources.CommonPrefixes = appendUniq(resources.CommonPrefixes, delimited)
|
resources.CommonPrefixes = appendUniq(resources.CommonPrefixes, delimited)
|
||||||
}
|
}
|
||||||
case resources.Delimiter != "" && strings.HasPrefix(name, resources.Prefix):
|
case resources.Delimiter != "" && strings.HasPrefix(name, resources.Prefix):
|
||||||
delimited := delimiter(name, resources.Delimiter)
|
_internal := strings.TrimPrefix(name, resources.Prefix)
|
||||||
|
delimited := delimiter(_internal, resources.Delimiter)
|
||||||
switch true {
|
switch true {
|
||||||
case delimited == "":
|
case delimited == "":
|
||||||
metadata := mstorage.ObjectMetadata{
|
metadata := mstorage.ObjectMetadata{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
Key: name,
|
Key: _internal,
|
||||||
Created: file.ModTime(),
|
Created: file.ModTime(),
|
||||||
Size: file.Size(),
|
Size: file.Size(),
|
||||||
ETag: bucket + "#" + name,
|
ETag: bucket + "#" + name,
|
||||||
|
Loading…
Reference in New Issue
Block a user