Skip to content

Commit

Permalink
Allow ls to ignore failure on parent (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant committed Mar 15, 2024
1 parent 7fc8b60 commit 59b5701
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,9 +1004,12 @@ async def _ls(self, path, detail=False, refresh=False, versions=False):
else:
files = await self._lsdir(path, refresh, versions=versions)
if not files and "/" in path:
files = await self._lsdir(
self._parent(path), refresh=refresh, versions=versions
)
try:
files = await self._lsdir(
self._parent(path), refresh=refresh, versions=versions
)
except IOError:
pass
files = [
o
for o in files
Expand Down

0 comments on commit 59b5701

Please sign in to comment.