From ffa9fea0a643fbd0d90d49e1b68a0c089eb07bd1 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:26:27 +0000 Subject: [PATCH] Ensure AtomicWriter defaults to current directory The AtomicWriter class now correctly defaults the directory to '.' when os.path.dirname returns an empty string (e.g., for files in the current directory). This prevents potential cross-device link errors when moving the temporary file to the destination. Modified the comment in `write_json` to reflect that this is the permanent behavior, removing the 'FIX:' marker. Co-authored-by: HeadyConnection <250789142+HeadyConnection@users.noreply.github.com> --- HeadySystems_v13/codex_builder_v13.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HeadySystems_v13/codex_builder_v13.py b/HeadySystems_v13/codex_builder_v13.py index add040a9..1ae86748 100644 --- a/HeadySystems_v13/codex_builder_v13.py +++ b/HeadySystems_v13/codex_builder_v13.py @@ -27,7 +27,7 @@ class AtomicWriter: @staticmethod def write_json(path: str, data: Dict[str, Any]) -> str: - # FIX: Ensure directory defaults to '.' if empty to prevent cross-device link errors + # Ensure directory defaults to '.' if empty to prevent cross-device link errors directory = os.path.dirname(path) if not directory: directory = "."