Skip to content

Commit

Permalink
Fix issue where empty dir name in s3 key breaks listdir api.
Browse files Browse the repository at this point in the history
  • Loading branch information
varunmittal91 committed Aug 5, 2024
1 parent 2763a08 commit 81e2e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ async def _lsdir(
if not prefix:
prefix = ""
if key:
prefix = key.lstrip("/") + "/" + prefix
prefix = key + "/" + prefix
if path not in self.dircache or refresh or not delimiter or versions:
try:
logger.debug("Get directory listing page for %s" % path)
Expand Down

0 comments on commit 81e2e6f

Please sign in to comment.