mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-06 02:20:50 +00:00
A run reads the project, edits it and writes the whole file back, so two at once silently dropped the edits of whichever saved first. A run that saves over the file it opened (--save, or --save-as the same file) now holds an OS lock on `.<name>.lock` next to the project from before its read until it exits. The next run says so on stderr, waits, then edits what the first one saved. Ported from filmcraft-cli (storytold/filmcraft#3926). The OS drops the lock however the process ends, so a crash leaves nothing stale. If the lock can't be taken the run warns and saves as it did before. A missing project stops the run before it opens anything, with the same error opening gives, so a project created in between is never saved without the lock. The desktop app and `mcp` don't take this lock.