mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 02:07:09 -06:00
Renaming a saved PDF preset (pdf.preset.save with newName) removed the old file from the PDF Presets folder before it wrote the new one. When that write failed, for example on a full disk, the folder held no file for the preset, and the preset was gone at the next start. The store now writes the new file first and removes the old one only when that write succeeded. A failed write leaves the preset in the folder under its old name. A rename that changes only the case of the name writes the old file and then renames it, and the old file gets its content back when the rename fails. The command still succeeds when the folder can't be written, and the failure is logged, as before.