Skip to content

Commit 46382fc

Browse files
committed
Review comments
1 parent 950f6d8 commit 46382fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/zarr/storage/_local.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ async def delete_dir(self, prefix: str) -> None:
214214
path = self.root / prefix
215215
if path.is_dir():
216216
shutil.rmtree(path)
217+
elif path.is_file():
218+
raise ValueError(f"delete_dir was passed a {prefix=!r} that is a file")
219+
else:
220+
# Non-existent directory
221+
# This path is tested by test_group:test_create_creates_parents for one
222+
pass
217223

218224
async def exists(self, key: str) -> bool:
219225
# docstring inherited

0 commit comments

Comments
 (0)