-
-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[s3] Properly exclude empty folders during 'listdir'
Users can create empty folders on S3, by creating an object which name ends with a forward slash, for example `folder/`. Using the `listdir` operation on an empty folder returns `[], ["."]`. This is unexpected, there are no file named `.` in the folder. The reason for its presence is AWS S3 returning the following content when listing the content of the directory: ``` { 'Contents': [ {... 'Key': 'folder/', ...} ], ... } ``` Then, `posixpath.relpath("folder/", "folder/")` returns ".".
- Loading branch information
1 parent
fe6dd57
commit 66f4f8e
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters