Skip to content

Commit 8c023d9

Browse files
committed
Fix issue where empty dir name in s3 key breaks listdir api.
1 parent f3f17d2 commit 8c023d9

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
@@ -697,7 +697,7 @@ async def _lsdir(
697697
if not prefix:
698698
prefix = ""
699699
if key:
700-
prefix = key.lstrip("/") + "/" + prefix
700+
prefix = key + "/" + prefix
701701
if path not in self.dircache or refresh or not delimiter or versions:
702702
try:
703703
logger.debug("Get directory listing page for %s" % path)

0 commit comments

Comments
 (0)