mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-25 09:50:59 +00:00
Nothing replaces a read-only file on Windows, neither a rename over it nor an in-place write, so the opt-in that keeps a read-only config saveable clears the attribute first; without that the test for it could not pass there. A failed config write still leaves the flag dirty, as before this change, but the next attempt waits ten seconds, so the idle handler does not repeat a hopeless write on every event. A file moved aside by a refused rename can be the only copy left if the process dies in between, so the sweep puts such a file back when its original is missing rather than removing it, and the directory-only errors that could only come from a directory target no longer trigger the move-aside at all. The sweep after a write runs only under the data dir and at most once an hour per directory, so a batch of saves does not read the directory once per file and an export into a user's folder never reads that folder. A lock holder that never lets go doubles the cool-down for each timeout in a row, up to five minutes, instead of costing a stall every ten seconds for good.
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: