1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56: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:
mergify[bot] 2025-07-31 03:10:04 +00:00 committed by GitHub
commit a24fddb779
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,7 +126,7 @@ LocalStore::LocalStore(std::string_view scheme, PathView path, const Params & pa
Path gcRootsDir = stateDir + "/gcroots";
if (!pathExists(gcRootsDir)) {
createDirs(gcRootsDir);
createSymlink(profilesDir, gcRootsDir + "/profiles");
replaceSymlink(profilesDir, gcRootsDir + "/profiles");
}
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {