mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 18:47:42 -06:00
- Convert to DNG / Copy as DNG: the encoded DNG must decode to the same raw data, then goes through safe_file::write_new_unique (temp file, sync, read-back, hard-linked to the first free <stem>.dng / -2 / -3 name, never replacing a file). On failure no DNG is left, the photo is not relinked and the raw copy is kept. - Photo Merge writes its DNG the same way. - Smart previews are written atomically; smart::is_valid (header + complete JPEG) decides "built", has_smart_preview and the offline fallback, so a proxy cut short is rebuilt (reported as `repaired`); moving proxies to a new folder never deletes a good one in favour of a damaged copy and copies across drives atomically. Stacked on the #93 branch (shared lightcraft_catalog::safe_file helper). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>