Commit d66a288
feat: support directory references in <filepath@store> (fixes #1410)
Previously is_dir was hardcoded to False in FilepathCodec.encode(),
and StorageBackend.exists() used Path.is_file() which returned False
for directories. Together these caused directory paths to fail the
existence check and never set is_dir correctly.
Changes:
- storage.py: StorageBackend.exists() now uses Path.exists() so
directories pass the check; add isdir() method for both local
and remote (fsspec) backends.
- filepath.py: encode() calls backend.isdir() to detect directories
dynamically; size is set to None for directories.
- objectref.py: _verify_folder() returns True (unverified-but-valid)
when no manifest is present, rather than raising IntegrityError.
Directories stored without a manifest are accepted.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent 34acbbe commit d66a288
File tree
3 files changed
+34
-8
lines changed- src/datajoint
- builtin_codecs
3 files changed
+34
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
158 | | - | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
| 383 | + | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
578 | 598 | | |
579 | 599 | | |
580 | 600 | | |
| |||
0 commit comments