Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ListObjectsV2 fails to list empty folders #11370

@chrisharward

Description

@chrisharward

If I create an empty folder in Amazon S3 (a zero byte object with a trailing slash in its name), and then run a ListObjects_v2 using the object key as the prefix of the operation, Amazon returns the empty folder in the ListBucketResult. I find that doing the same on MinIO does not.

Expected Behavior

If I create a zero byte object with a trailing slash in its key (say "prefix/"), and then run a ListObjects_v2 request with prefix=prefix/, I expect the ListBucketResult to have a single entry in the Contents field for the prefix/ item.

Current Behavior

The Contents member of the ListBucketResult is empty.

Possible Solution

Not sure.

Context

We use MinIO to implement system/integration tests for a system aimed at running against Amazon S3, so having it match the behavior of Amazon S3 as closely as possible makes that more effective and reduces the amount of testing we need to do against Amazon S3.

Regression

Not that I know of.

Your Environment

This is reproduceable in play.minio.io

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions