mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
Only use renameFile where needed
In most places the fallback to copying isn’t needed and can actually be bad, so we’d rather not transparently fallback
This commit is contained in:
parent
d71d9e9fbf
commit
90f9680733
3 changed files with 19 additions and 6 deletions
|
|
@ -1430,7 +1430,7 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, std::string_view name
|
|||
writeFile(realPath, dumpSource);
|
||||
} else {
|
||||
/* Move the temporary path we restored above. */
|
||||
renameFile(tempPath, realPath);
|
||||
moveFile(tempPath, realPath);
|
||||
}
|
||||
|
||||
/* For computing the nar hash. In recursive SHA-256 mode, this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue