mirror of
https://github.com/NixOS/nix.git
synced 2025-12-02 23:20:59 +01:00
libstore: Use makeTempPath in optimizePath_
This was intended to be cherry-picked in6aed9d877c, but was left hanging. This is actually important for fixing [^]. emilazy let me know of this bad cherry-pick and its significance. [^]: https://github.com/NixOS/nix/issues/7273 Originally fixed by Lily Ballard <lily@ballards.net> in https://gerrit.lix.systems/c/lix/+/2100. (cherry picked from commitd888846b68)
This commit is contained in:
parent
bd0522c15b
commit
6c4dc93d9b
1 changed files with 1 additions and 1 deletions
|
|
@ -234,7 +234,7 @@ void LocalStore::optimisePath_(
|
|||
its timestamp back to 0. */
|
||||
MakeReadOnly makeReadOnly(mustToggle ? dirOfPath : "");
|
||||
|
||||
std::filesystem::path tempLink = fmt("%1%/.tmp-link-%2%-%3%", config->realStoreDir, getpid(), rand());
|
||||
std::filesystem::path tempLink = makeTempPath(config->realStoreDir.get(), ".tmp-link");
|
||||
|
||||
try {
|
||||
std::filesystem::create_hard_link(linkPath, tempLink);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue