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 Oct 18, 2023
1 parent f3f17d2 commit 8c023d9
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 @@ -697,7 +697,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 8c023d9

Please sign in to comment.