Skip to content

Commit

Permalink
Address review concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Aug 20, 2024
1 parent 51a1a93 commit 75e2539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tosfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def rmdir(self, path: str) -> None:
if not self.isdir(path):
raise NotADirectoryError(f"{path} is not a directory.")

if len(self.ls(path, refresh=True, detail=False)) > 0:
if len(self._listdir(bucket, max_items=1, prefix=key.rstrip("/") + "/")) > 0:
raise TosfsError(f"Directory {path} is not empty.")

try:
Expand Down

0 comments on commit 75e2539

Please sign in to comment.