diff --git a/graphify/watch.py b/graphify/watch.py index fce4053df..b2f977d60 100644 --- a/graphify/watch.py +++ b/graphify/watch.py @@ -2067,7 +2067,12 @@ def _rebuild_code( (out / _HTML_STALE_MARKER).touch() from graphify.export import backup_if_protected as _backup _backup(out) - graph_tmp.replace(existing_graph) + # os_replace_with_fallback, not a plain Path.replace (#2689): this + # function read existing_graph a few lines up for the same_graph + # comparison, and on a VMware HGFS shared folder a replace over a + # destination read earlier in the same process raises + # PermissionError even on the same drive. + os_replace_with_fallback(graph_tmp, existing_graph) report_path.write_text(report, encoding="utf-8") labels_file.write_text(labels_json, encoding="utf-8") # Keep the membership signatures in step with the labels we just wrote.