diff --git a/s3fs/core.py b/s3fs/core.py index 670b84ee..dab590d3 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -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)