Skip to content

Commit

Permalink
Make a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithun Shivashankar committed Dec 11, 2024
1 parent 1f8ee52 commit ed9b64a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion asab/library/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,14 @@ async def get_item_metadata(self, path: str) -> typing.Optional[dict]:
if not directory or not filename:
L.warning("Invalid path '{}': missing directory or filename.".format(path))
return None
# Ensure directory ends with '/'
if not directory.endswith('/'):
directory += '/'

try:
# Fetch all items in the directory
items = await self.list("/")
items = await self.list(directory)
print(items)
except Exception as e:
L.warning("Failed to list items in directory '{}': {}".format(directory, e))
return None
Expand Down

0 comments on commit ed9b64a

Please sign in to comment.