Skip to content

Commit ceab6b8

Browse files
committed
BUG: fix FSStore.listdir when key_separator == '/'
1 parent f1afc57 commit ceab6b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zarr/storage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,8 @@ def listdir(self, path=None):
11631163
for file_name in self.fs.find(entry_path):
11641164
file_path = os.path.join(dir_path, file_name)
11651165
rel_path = file_path.split(root_path)[1]
1166-
new_children.append(rel_path.replace(os.path.sep, '.'))
1166+
rel_path = rel_path.lstrip('/')
1167+
new_children.append(rel_path.replace('/', '.'))
11671168
else:
11681169
new_children.append(entry)
11691170
return sorted(new_children)

0 commit comments

Comments
 (0)