mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
Compilation: use renameTmpIntoCache
solves several problems with this pattern
This commit is contained in:
parent
f0d3b7abb8
commit
f4d328e2ac
@ -5718,7 +5718,7 @@ pub fn cImport(
|
|||||||
const o_sub_path = "o" ++ fs.path.sep_str ++ hex_digest;
|
const o_sub_path = "o" ++ fs.path.sep_str ++ hex_digest;
|
||||||
|
|
||||||
if (comp.verbose_cimport) log.info("renaming {s} to {s}", .{ tmp_sub_path, o_sub_path });
|
if (comp.verbose_cimport) log.info("renaming {s} to {s}", .{ tmp_sub_path, o_sub_path });
|
||||||
try fs.rename(cache_dir, tmp_sub_path, cache_dir, o_sub_path);
|
try renameTmpIntoCache(comp.dirs.local_cache, tmp_sub_path, o_sub_path);
|
||||||
|
|
||||||
break :digest .{ bin_digest, false };
|
break :digest .{ bin_digest, false };
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user