Empty directory in aws key breaks listdir api.
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 305
- Avg merge
- 22h 37m
- Merged PRs (30d)
- 4
Description
Example: s3://test_bucket//test_path
The double slash '//' is valid part of the key, we were able to validate that for a customer. But due to lstrip in core.py on key, s3 will fail to list without this exact string.
Current behavior
s3.listdir("s3://test_bucket//test_path") -> []
Expected behavior
s3.listdir("s3://test_bucket//test_path") -> [{'Key': 'test_bucket//test_path/dir1', 'Size': 0, 'StorageClass': 'DIRECTORY', 'type': 'directory', 'size': 0, 'name': 'test_bucket//test_path/dir1'}
]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in core.py and trace the key handling used by the listdir API for the issue's s3://test_bucket//test_path example. Reproduce the current empty result and verify that listing preserves the double slash and returns the expected directory entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100