We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 950f6d8 commit 46382fcCopy full SHA for 46382fc
src/zarr/storage/_local.py
@@ -214,6 +214,12 @@ async def delete_dir(self, prefix: str) -> None:
214
path = self.root / prefix
215
if path.is_dir():
216
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
223
224
async def exists(self, key: str) -> bool:
225
# docstring inherited
0 commit comments