mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 14:46:03 +00:00
When a second running copy listed the recovery folder, it could lock an area that this copy had just made but not yet locked, take it for a crashed copy's empty area and remove it. Locking the area then failed, and the recovery save reported "No such file or directory". On macOS the lock could also fail with "Invalid argument" on the removed lock file. Taking a new area now counts it as busy, and tries the next name, when its folder or lock file is gone by the time it is locked, when its lock file is there but cannot be opened (some file systems keep a removed file that another copy still has open until it is closed), or when the lock file that was locked is no longer the one in the folder. Tidying an empty area, and quitting, now remove the area while it is still locked, and remove its folder once more after letting it go if the folder is empty.