authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-08-13 15:04:25-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-09-24 20:01:19-07:00
logf4d328e2ac0583336085f647df18c7430b7948be
tree78585360110509894beb540898c35ccebd932107
parentf0d3b7abb8e96aede796c80ab73a0f82ecced722

Compilation: use renameTmpIntoCache

solves several problems with this pattern

1 files changed, 1 insertions(+), 1 deletions(-)

src/Compilation.zig+1-1
......@@ -5718,7 +5718,7 @@ pub fn cImport(
57185718 const o_sub_path = "o" ++ fs.path.sep_str ++ hex_digest;
57195719
57205720 if (comp.verbose_cimport) log.info("renaming {s} to {s}", .{ tmp_sub_path, o_sub_path });
5721 try fs.rename(cache_dir, tmp_sub_path, cache_dir, o_sub_path);
5721 try renameTmpIntoCache(comp.dirs.local_cache, tmp_sub_path, o_sub_path);
57225722
57235723 break :digest .{ bin_digest, false };
57245724 };