LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge branch 'fix/issue-94-control-close' into integrate/safety
Brandon Thomascc8b3eb3bb4f
diff --cc docs/whats-new.mdindex 2bb68baf8,adc7783cd..dc7012dc3--- a/docs/whats-new.md+++ b/docs/whats-new.md@@@ -10,35 -10,9 +10,38 @@@- 23 new built-in presets: Portrait, Landscape, Urban, Food, Seasons, Vintage and B&W toners.### Reliability+- Exports and renders never write over a photo's original (issue #93): exporting into the photo's own folder with+ the same name and "Overwrite" (or Export with Previous repeating it), an exact output path from the control+ channel or MCP, a merge preview path or `lightcraft-cli render IMG.jpg -o IMG.jpg` is refused with a clear+ message, and the original is left byte for byte. Ordinary earlier exports are still overwritten when asked.+ Exported files are written to a temp file, synced and then renamed into place, so a full disk or an unplugged+ drive never leaves a truncated file; the XMP sidecar of an "Original" export follows the "If file exists"+ choice too.+- Convert to DNG, Copy as DNG, Photo Merge and smart previews no longer write straight to the final file (issue+ #106): a DNG is checked against the raw data, written to a temp file, synced and read back before it gets its+ name (never replacing a file), and only then is the photo relinked or the raw copy removed — a failed write+ leaves no DNG and keeps the raw. Smart previews are written the same way; a damaged one (cut short by a crash or+ a full drive) no longer counts as built and Build Smart Previews replaces it.+- Import ▸ Copy verifies every copy, like Move (issue #96): each file is written as a new file, synced to disk and+ compared byte for byte with the card. A copy that fails or differs is removed and reported as a failed import —+ so "import complete" means the copies are good before you format the card — and a name that is taken gets -1,+ -2… instead of being replaced.+- Saving metadata to an XMP sidecar another application wrote no longer replaces it (issue #92): LightCraft merges its+ fields in and keeps the rest — e.g. that application's develop settings and edit history — byte for byte. A+ sidecar that isn't valid XMP is copied to `<name>.xmp.bak-<time>` first. With the default stem naming, a raw and a+ JPEG with the same name (`IMG_0001.CR3` + `IMG_0001.JPG`) no longer share one sidecar: the raw keeps `IMG_0001.xmp`,+ the JPEG uses `IMG_0001.JPG.xmp`.+- A save that fails part-way (a full disk, a network share that drops) no longer looks like a damaged catalog+ afterwards (issue #101): the partial write is cut off before LightCraft retries, so the next launch replays every+ change. Catalogs already holding such a fragment load in full. Quitting while the catalog log can't be written+ still saves your queued changes in the closing snapshot.+- The catalog has a format version (issue #102). Opening a library from an older LightCraft upgrades it; a library+ written by a newer LightCraft is refused with "this library was written by a newer version of LightCraft" and left+ untouched — older versions no longer read part of it as a damaged log. Once this version has opened a library,+ LightCraft 0.2.0 and older refuse it ("unsupported format … v2").+ - The control port (`--control`) closes a connection as soon as it receives anything that isn't a JSON request+ (issue #94): an HTTP request from a web page can no longer carry a command in its body. Lines are capped at+ 4 MiB and connections at 16.- Canon CR2 photos from the EOS 7D, 50D, 60D, 550D, 600D, 1200D, 1300D, 5D Mark II and 1D Mark IV (and othermodels whose sensor starts on a green-blue row) no longer come out magenta (issue #85): the colour-filterlayout is read from each file instead of assumed.