Skip to content

Commit d80fb2c

Browse files
committed
(fix): ensure zip directory store compares key to prefix correctly
1 parent 0c154c3 commit d80fb2c

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
@@ -271,7 +271,7 @@ async def list_dir(self, prefix: str) -> AsyncIterator[str]:
271271
yield key
272272
else:
273273
for key in keys:
274-
if key.startswith(prefix + "/") and key != prefix:
274+
if key.startswith(prefix + "/") and key.strip("/") != prefix:
275275
k = key.removeprefix(prefix + "/").split("/")[0]
276276
if k not in seen:
277277
seen.add(k)

0 commit comments

Comments
 (0)