Files
P2H 84b296e0d6 Import: optional backup copy that mirrors the destination (#4840) (#4847)
* Import: optional backup copy that mirrors the destination (#4840)

Copy and Move imports can make a second, verified copy of each file in a
backup folder (dialog: Backup to; library.import: backup). The backup takes
the path the main copy ended up with, relative to the destination, so
folder and rename templates, sequence numbers, the -1 of a taken name and
Copy as DNG all carry over: the backup mirrors the destination.

Each backup gets the check Copy runs (copy_verified: a new file, synced,
checked against the probe hash or byte for byte); a bad one is removed and
reported in backupFailed. A Move keeps the original of a photo whose backup
failed. A different file already at the backup's place is left alone and
reported, never renamed. A backup with mode add, or a backup folder that is,
is inside or contains the destination, is refused up front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Import backup: address review findings (#4840)

- A backup place that is the file being imported (a backup folder set to
  the card) is not a backup: it is reported, and a Move keeps the original
  instead of deleting the only copy.
- The backup folder check runs when library.import's params are checked,
  so the import dialog refuses it before creating a new album.
- The "outside the destination" check also compares the folders with
  links resolved through their nearest existing ancestor, so a backup
  folder that doesn't exist yet can't slip inside the destination.
- A photo browsed in Local that a Copy or Move adds in place is reported
  in backupFailed.
- docs/user describes the latest release only: the import guide's backup
  step is held back until a release ships the option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Import backup: resolve `..` and relative backup paths; refuse a backup on the main copy (#4840)

- import_move::resolved makes a path absolute and follows it part by part:
  links of the parts that exist are resolved, and a `..` after a part that
  doesn't exist yet steps back from it (it used to stop there and compare
  the path unresolved, so <base>/missing/../out/bk got past the "outside
  the destination" check).
- back_up also refuses a backup place that is the main copy or one of a
  Move's placed sidecars, not only the original.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Import backup: compare backup and destination in one path form (#4840)

On Windows, import_move::resolved gave a path whose first folder exists in
the \?\C:\ form canonicalizing returns, and one whose first folder doesn't
in the plain C:\ form; Path::starts_with told them apart, so a backup
inside a destination that doesn't exist yet could pass the overlap check.
resolved now always returns the plain form, and compare_key (used by the
overlap check and the backup-is-the-file check) also ignores letter case
on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Import backup: check folder overlap on resolved paths only (#4840)

backup_folder_error also ran import_move::inside, which compares the raw
paths first, so a folder beside the destination named through it
(<dest>/../bk) was refused as inside it. The resolved comparison
(compare_key: absolute, links and `..` followed) already covers equal and
nested folders, so the raw checks are dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* add my real name in contributors

* Import backup: a Move checks its backup again before removing the original (#4840)

The backup path a transfer made was dropped from the Move's bookkeeping,
so finish_moves checked only the main copy: a backup removed (or a backup
drive unplugged) while the catalog was committed and saved still let the
original be deleted. The path is now carried to finish_moves, and
import_move::backup_intact checks the photo's backup and its sidecars'
against the placed copies before the source is removed; when it fails the
original stays, reported in kept like a backup that failed outright.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:40:11 +01:00

1.8 KiB

Feature naming

LightCraft uses Perspective Correction, Guided Perspective, and Perspective Guides for its own geometry controls. The section includes Off, Auto, Guided, Level, Vertical and Full modes, so its name does not imply every mode is automatic.

The previous Upright terminology is a naming-review candidate, not a verified finding about trademark registration. These descriptive names are chosen to distinguish LightCraft's own implementation.

Compatibility boundary

The geometry.upright, geometry.guides and tool.guidedUpright commands, saved tool keys, Rust enum variants and serialized settings remain stable. XMP crs:PerspectiveUpright and UprightTransform_* mappings and Lightroom import messages still describe the external format accurately. No rendering, import or export logic changes.

All 17 shipped non-English catalogs contain the new labels. The normal CI, perspective-mode tests and a visual panel/tool check remain required before this draft is marked ready.

Regression coverage

The standard-library-only display_names integration tests scan production Rust string literals for the retired display names and preserve explicit compatibility exceptions. They also test identifier, comment and raw-string handling. These focused checks do not replace application or visual testing.

Import backup copy

The import dialog's option to copy each imported file to a second folder is labelled Backup to, and its parameter is backup. Both are ordinary descriptive words for what the option does: it keeps a backup copy. The label does not use another photo library's name for its version of this option. Checked 2026-11-27 against the naming standard's names list; no trademark search was run, since the label is plain descriptive wording.