mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-24 17:26:47 +00:00
The two-step rename fallback removed the target before its second try, and rename(2) reports the same errors for a source it cannot move, so a refusal about the source cost the caller its existing file. The target is moved aside and put back if the second step fails too. The wait for a reader holding the target open was layered on the write helper and ran on every platform and for every refusal, so a read-only target on Windows cost half a second before failing anyway, while G-code exports through rename_file() got no wait at all. It lives in rename_file() now, on Windows only, and only for a target this process could write. A failed config write clears the dirty flag as it always did, so the idle handler does not repeat it on every tick. The lock file is created readable and writable by every user, since another user sharing the data dir has to open it read-write; the check that the file behind the path is still the one opened runs at most every few seconds rather than once per preset during a scan; the physical printer loader reads under the lock; the stat headers join the existing platform include block; and the utility tests keep their file's tag.
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: