Skip to content

Commit 92f677e

Browse files
committed
Fix issue where empty dir name in s3 key breaks listdir api.
1 parent 51e3c80 commit 92f677e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

s3fs/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ async def _lsdir(
725725
if not prefix:
726726
prefix = ""
727727
if key:
728-
prefix = key.lstrip("/") + "/" + prefix
728+
prefix = key + "/" + prefix
729729
if path not in self.dircache or refresh or not delimiter or versions:
730730
try:
731731
logger.debug("Get directory listing page for %s" % path)

0 commit comments

Comments
 (0)