mirror of
https://github.com/sal063/AC6_recomp
synced 2026-08-22 15:11:33 -04:00
7117b5b24a
Overwriting a file through the content device used to delete the old file before the first new byte was written, so a crash or kill mid-save destroyed the existing data. A failed first-time save then left a half-written file the game reported as corrupted until it was deleted by hand. Writes now go to a temp file and commit by rename on close, keeping one .bak generation of the previous version. An interrupted write leaves the old data untouched, and a startup sweep resolves any write that died between the commit steps.