Skip to content

Commit 49dd74e

Browse files
committed
Fix issue where empty dir name in s3 key breaks listdir api.
1 parent 2763a08 commit 49dd74e

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
@@ -714,7 +714,7 @@ async def _lsdir(
714714
if not prefix:
715715
prefix = ""
716716
if key:
717-
prefix = key.lstrip("/") + "/" + prefix
717+
prefix = key + "/" + prefix
718718
if path not in self.dircache or refresh or not delimiter or versions:
719719
try:
720720
logger.debug("Get directory listing page for %s" % path)

0 commit comments

Comments
 (0)