Skip to content

Commit 06086dc

Browse files
committed
restore is_erasable check to rmdir function
Otherwise the save_array doc example fails to write to a ZipStore
1 parent 57a51c5 commit 06086dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zarr/storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def rmdir(store: StoreLike, path: Path = None):
133133
this will be called, otherwise will fall back to implementation via the
134134
`Store` interface."""
135135
path = normalize_storage_path(path)
136-
if hasattr(store, "rmdir"):
136+
if hasattr(store, "rmdir") and store.is_erasable(): # type: ignore
137137
# pass through
138138
store.rmdir(path) # type: ignore
139139
else:

0 commit comments

Comments
 (0)