mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-26 03:26:49 -06:00
Nothing a save wrote was synced to disk, so a power cut or crash of the system soon after Cmd+S could leave an empty or truncated session file (the rename can reach the disk before the data), or audio files that the session points at but that never reached the disk. No earlier version of the session file was kept either. New audio files, the Audio Files folder and the session's temporary file are now synced before the session file is renamed into place, and the session folder after the rename; templates are written the same way. A failed write or rename removes its temporary file instead of leaving it on a full disk. Before a save replaces the session file with different contents, the previous version is copied to Backups/<name> backup <n>.scraft beside it, and the newest ten are kept. Autosaves make no backups.