Skip to content

Commit 3c94a6b

Browse files
committed
Fix issue where empty dir name in s3 key breaks listdir api.
1 parent 214d3bb commit 3c94a6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: s3fs/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ async def _lsdir(
690690
if not prefix:
691691
prefix = ""
692692
if key:
693-
prefix = key.lstrip("/") + "/" + prefix
693+
prefix = key + "/" + prefix
694694
if path not in self.dircache or refresh or not delimiter or versions:
695695
try:
696696
logger.debug("Get directory listing page for %s" % path)

0 commit comments

Comments
 (0)