Skip to content

Commit 9f28b10

Browse files
fix: enable auto_mkdir for local filesystem in StorageBackend
The fsspec local filesystem needs auto_mkdir=True to automatically create parent directories when writing files. This is required for Zarr 3.x which doesn't create directories when opening arrays with mode='w' through an FSMap. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent ff7f71e commit 9f28b10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datajoint/storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def fs(self) -> fsspec.AbstractFileSystem:
287287
def _create_filesystem(self) -> fsspec.AbstractFileSystem:
288288
"""Create fsspec filesystem based on protocol."""
289289
if self.protocol == "file":
290-
return fsspec.filesystem("file")
290+
return fsspec.filesystem("file", auto_mkdir=True)
291291

292292
elif self.protocol == "s3":
293293
# Build S3 configuration

0 commit comments

Comments
 (0)