fix: treat bare jd:/jdrive: destinations as the root directory #55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bare-jd-remote-destination"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Since the v2 stateless storage rewrite (commit
93b51a3), a barejd:destination no longer behaves as the root directory — it is classified as a literal root file:The upload succeeded but wrote object key
jdrive/v2, which the v2 listing filter (storage-list-prefix→jdrive/v2/…) deliberately never shows — silent data-invisibility. The same command worked for months on the pre-rewrite manifest-based storage, where a barejd:normalized to/and the manifest catalog round-tripped the file. This is a regression from the rewrite, not user error.Also inconsistent today:
jd ls jd:works (root), whilejd cp ./x jd:silently places the file at the root as a file.Root cause
path-directory-marker?(jdrive/s3/syncv2.ss) only treats a destination as a directory when the locator-stripped path is"/"or ends with"/". A barejd:strips to"", so it fails the directory test. Sync scope, local→remote put, and remote→remote copy all share this single predicate.Fix
Treat a bare locator (
jd:,jdrive:) — empty afterstrip-locator— as the root directory, matching the documented rule thatjd:photos≡jd:/photosand restoring v1 semantics:jd cp ./x jd:→/x(identical tojd cp ./x jd:/)jd ls jd:→ unchanged (already worked)jd:→ rootVerification
jdrive-s3-v2-test-path-directory-marker?coverjd:,jdrive:,/,jd:/as directories andjd:/notes.txt,/notes.txtas files.make test— all tests pass (25 PASS).make binary+make binary-smoke— clean build, installed-bundle smoke passed.make security— pass.uap21, profileober):s3 cp /tmp/barejd-test.txt jd:now reports"Destination":"/barejd-test.txt"(was"/").s3 ls jd:lists it;s3 get jd:/barejd-test.txtround-trips byte-identical. Test object cleaned up.Version
VERSION2.0.9 → 2.0.10;cli.ssuser-visible version andjpkg.sexpsynced to 2.0.10.