Repository navigation
Windows: case-insensitive sidecar/rename fixes; Windows test and toolchain fixes - #1052
Conversation
…me/sidecar tests
20 engine tests failed on Windows on clean main. Three real bugs on
case-insensitive volumes (Windows, default macOS APFS) caused most of them:
- Renaming a photo probed `a.XMP` before `a.xmp`. On a case-insensitive
volume the upper-case spelling "exists" when only `a.xmp` is there, so the
sidecar was moved as `Trip.XMP` (and its retained-packet record was taken
under the wrong spelling). Upper-case candidates are now used only when the
folder lists them exactly (new `MoveFs::listed`).
- `RealFs::same_file` on Windows (no file id in std) depended on argument
order: `same_file("Trip.XMP", "Trip.xmp")` was false when `Trip.xmp` is the
real entry, so saving after a partial rename reported a phantom collision.
It is now symmetric, and also requires the names to differ only by case
(two different files with equal size and mtime were "the same").
- Saving metadata picked the sidecar spelling by `is_file()`, lower case
first, so the atomic write renamed an existing `Trip.XMP` to `Trip.xmp`.
The spelling the folder lists now wins.
The rest were fixtures: FakeFs fault paths, catalog paths and expected
paths spelled with `/` while the code joins with the host separator.
Regression tests: case_insensitive_renames_keep_each_sidecars_spelling
(FakeFs, every platform; fails without the fix) and
same_file_spellings_are_symmetric_on_windows. Linux behaviour unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
desktop_exec treats a freedesktop Exec path as absolute when it starts with '/' on every platform (Path::is_absolute wants a drive letter on Windows); fill_box uses as_chunks (clippy::chunks_exact_to_as_chunks); LibraryLock::descriptor_copy is cfg(all(test, unix)) like its only test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Cross-check from macOS (case-insensitive APFS, rustc 1.99.0, Apple silicon): I ran the original, unmodified This PR also fixes what I filed as #1006 (the sidecar Two overlaps with my open PRs: the 🤖 Generated with Claude Code |
…platforms ci.yml exists, but main does not pass it yet. The storytold#989 fixes and the Windows ones (storytold#1052) are still outstanding, so the entry stays open: 6-12 h -> 2-4 h. Headline numbers are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…platforms ci.yml exists, but main does not pass it yet. The storytold#989 fixes and the Windows ones (storytold#1052) are still outstanding, so the entry stays open: 6-12 h -> 2-4 h. Headline numbers are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…platforms ci.yml exists, but main does not pass it yet. The storytold#989 fixes and the Windows ones (storytold#1052) are still outstanding, so the entry stays open: 6-12 h -> 2-4 h. Headline numbers are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Landed on main in #1431. Thank you, @OneSlips! If you haven't already, come and join us on Discord: https://discord.gg/artcraft Generated by Claude Code |
…ching Prefer real library entries when importing browsed copies and track promoted hashes across scan and background-import batches. Add synthetic regressions for permanent deletion, restart, trash restoration, and duplicate promotion. Draft validation on the previous base: 59 import tests passed; all 8 cargo xtask ci steps passed with PR storytold#1052 in a temporary validation worktree. Rebased onto main 68c9240, which includes storytold#1052; validation of this base is recorded in the PR. Co-authored-by: Codex <noreply@openai.com>
Split out of #1012 at a reviewer's request.
What and why
On clean
main, 20 engine tests failed on Windows. Most came from three real bugs that affect any case-insensitive volume (Windows, and macOS APFS by default):a.XMPbeforea.xmp. On a case-insensitive volume the upper-case spelling "exists" even when onlya.xmpis on disk, so the sidecar was moved asTrip.XMPand its retained-packet record was stored under the wrong spelling. Upper-case candidates are now used only when the folder lists that exact name (newMoveFs::listed).same_filesymmetry. On Windows,RealFs::same_file(std has no file id there) gave different answers depending on argument order:same_file("Trip.XMP", "Trip.xmp")was false whenTrip.xmpwas the real entry, so saving after a partial rename reported a collision that wasn't there. It is now symmetric. It also requires the two names to differ only by case, because before this two different files with the same size and mtime counted as "the same".is_file(), trying lower case first, so the atomic write renamed an existingTrip.XMPtoTrip.xmp. Whichever spelling the folder lists now wins.The remaining failures came from test fixtures that wrote paths with
/(FakeFs fault paths, catalog paths, expected paths), while the code joins paths with the host separator.Small Windows and toolchain fixes, in a second commit:
apps/lightcraft/src/editors.rsdesktop_exec: a freedesktopExecpath counts as absolute when it starts with/on every platform.Path::is_absoluteexpects a drive letter on Windows, soeditors::tests::desktop_entries_give_their_programfailed there.crates/pipeline/src/spots.rsfill_box:as_chunks::<3>()instead ofchunks_exact(3)(clippy::chunks_exact_to_as_chunkson newer toolchains).crates/catalog/src/lock.rsdescriptor_copy: now#[cfg(all(test, unix))]. Its only test is Unix-only, so on Windows it was dead code.Linux behaviour is unchanged.
Tests
case_insensitive_renames_keep_each_sidecars_spelling(FakeFs, runs on every platform, fails without the fix) andsame_file_spellings_are_symmetric_on_windows.cargo xtask cipasses all 8 steps (fmt, clippy, heif, test, parity, layers, assets, wasm), with no retries needed.🤖 Generated with Claude Code