mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Merge pull request #13636 from NixOS/mergify/bp/2.28-maintenance/pr-13368
libstore: fix race condition when creating state directories (backport #13368)
This commit is contained in:
commit
a24fddb779
1 changed files with 1 additions and 1 deletions
|
|
@ -126,7 +126,7 @@ LocalStore::LocalStore(std::string_view scheme, PathView path, const Params & pa
|
||||||
Path gcRootsDir = stateDir + "/gcroots";
|
Path gcRootsDir = stateDir + "/gcroots";
|
||||||
if (!pathExists(gcRootsDir)) {
|
if (!pathExists(gcRootsDir)) {
|
||||||
createDirs(gcRootsDir);
|
createDirs(gcRootsDir);
|
||||||
createSymlink(profilesDir, gcRootsDir + "/profiles");
|
replaceSymlink(profilesDir, gcRootsDir + "/profiles");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue