Files
dotCooCoo 39c0f35f22 Save: a checked save refuses a folder moved outside the write root
A checked save (`write_atomic_checked`, used by the engine's file writes
while automation write roots are set) opens the destination folder once
and puts the file in place through that open folder. A folder moved
after it was opened still received the file, so moving it out of the
write root while the file was written placed the file outside the root.

After the file is written, before it takes the old file's permissions
and again right before it is renamed into place, the folder's current
path is checked again with the same check. The copy fallback checks it
before the target is opened and again before the target is created or
overwritten. A folder moved outside the root, or one whose current path
the system does not report (FreeBSD), is refused: the temporary file
and any copy of the old content are removed, and the error names the
original destination. A move within the root keeps working as before.

Follows the checked-write work in 4cb6f8f152 and 6cf9145890.
2026-12-02 06:44:22 -08:00
..