fix: listing for directory object when delimiter is present (#11463)
When you have heirarchy of prefixes with directory objects our current master would list directory objects as prefixes when delimiter is present, this is inconsistent with AWS S3 ``` aws s3api list-objects --endpoint-url http://localhost:9000 \ --profile minio --bucket testbucket-v --prefix new/ --delimiter / { "CommonPrefixes": [ { "Prefix": "new/" }, { "Prefix": "new/new/" } ] } ``` Instead this PR fixes this to behave like AWS S3 ``` aws s3api list-objects --endpoint-url http://localhost:9000 \ --profile minio --bucket testbucket-v --prefix new/ --delimiter / { "Contents": [ { "Key": "new/", "LastModified": "2021-02-05T06:27:42.660Z", "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "Size": 0, "StorageClass": "STANDARD", "Owner": { "DisplayName": "", "ID": "02d6176db174dc93cb1b899f7c6078f08654445fe8cf1b6ce98d8855f66bdbf4" } } ], "CommonPrefixes": [ { "Prefix": "new/new/" } ] } ```master
parent
5fe4bb6b36
commit
1fdafaf72f
Loading…
Reference in new issue