Skip to content

Commit 6e4b1fd

Browse files
authored
handle empty string prefix in zipstore delete dir (#2492)
1 parent 26b6d8d commit 6e4b1fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zarr/storage/zip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def set_if_not_exists(self, key: str, value: Buffer) -> None:
215215
async def delete_dir(self, prefix: str) -> None:
216216
# only raise NotImplementedError if any keys are found
217217
self._check_writable()
218-
if not prefix.endswith("/"):
218+
if prefix != "" and not prefix.endswith("/"):
219219
prefix += "/"
220220
async for _ in self.list_prefix(prefix):
221221
raise NotImplementedError

0 commit comments

Comments
 (0)