From ab2bde0956a398fa832776e795ba0e48f11076f5 Mon Sep 17 00:00:00 2001 From: ayushcodes10 Date: Sat, 12 Sep 2026 13:30:12 +0530 Subject: [PATCH] Use the replace fallback for GraphML export The GraphML writer replaced its temp file directly with no Windows fallback of any kind, so a mid size export could hit the same class of failure as the cache and install paths. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017qfdzgbA5KedGEjD1AayNh --- graphify/export.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/graphify/export.py b/graphify/export.py index a8f3f0f7a..43c9b9adb 100644 --- a/graphify/export.py +++ b/graphify/export.py @@ -16,7 +16,12 @@ from networkx.readwrite import json_graph from graphify.security import sanitize_label from graphify.analyze import _node_community_map from graphify.build import edge_data -from graphify.paths import stem_filename_budget, write_json_atomic, write_text_atomic +from graphify.paths import ( + os_replace_with_fallback, + stem_filename_budget, + write_json_atomic, + write_text_atomic, +) from graphify.exporters.graphdb import push_to_falkordb, push_to_neo4j # noqa: E402,F401 @@ -1270,7 +1275,7 @@ def to_graphml( tmp = out.with_name(out.name + ".tmp") try: nx.write_graphml(H, str(tmp)) - os.replace(str(tmp), str(out)) + os_replace_with_fallback(str(tmp), str(out)) finally: if tmp.exists(): try: