Skip to content

Commit 9c173c1

Browse files
committed
fixup
1 parent a94e53c commit 9c173c1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/zarr/abc/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ async def delete_prefix(self, prefix: str) -> None:
399399
raise NotImplementedError
400400
self._check_writable()
401401
async for key in self.list_prefix(prefix):
402-
await self.delete(f"{key}")
402+
await self.delete(key)
403403

404404
def close(self) -> None:
405405
"""Close the store."""

src/zarr/storage/local.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ async def list(self) -> AsyncGenerator[str, None]:
227227
async def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
228228
# docstring inherited
229229
to_strip = str(self.root)
230-
if prefix.endswith("/"):
231-
prefix = prefix[:-1]
230+
prefix = prefix.rstrip("/")
232231
for p in (self.root / prefix).rglob("*"):
233232
if p.is_file():
234233
yield str(p.relative_to(to_strip))

0 commit comments

Comments
 (0)