mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 14:46:03 +00:00
While an app runs, its Data Recovery area's .lock file, or the whole area folder, can be removed by the user, a cleaner or another program. The app kept writing copies into an area that no lock held, and another app could lock that area and offer the copies as a crash's copies. Each recovery save and heartbeat now checks that the file at the area's .lock path is still the file the app locked. When the lock file or the folder is gone, or another file is in its place, the app makes the area again if it is gone, locks it again, and writes again the copies that went with the folder. A lock file that can't be read for another reason still counts as held. When another app holds the area by then, the app takes a new area and writes every copy there. The app does not offer or discard its own copies in the old area as a crash's copies. It removes each one when its document has a copy in the new area, or is saved, reverted or closed, and removes all of them when it quits with nothing unsaved. The app that holds the old area also removes them when it quits with nothing unsaved. A copy that was being written when the Data Recovery folder preference changed is now removed from the folder it was written to. Before, the document took that copy as its current one, and the copy stayed in the old folder after the document was saved or closed.