1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

Clean up one path computation with / operator

Because of the previous commit, we need to use `std::filesystem::path`
anyways.
This commit is contained in:
John Ericson 2025-03-17 17:56:37 -04:00
parent d3de22b2be
commit 91e90aaee0

View file

@ -245,7 +245,7 @@ void LocalStore::findRoots(const Path & path, std::filesystem::file_type type, R
else { else {
target = absPath(target, dirOf(path)); target = absPath(target, dirOf(path));
if (!pathExists(target)) { if (!pathExists(target)) {
if (isInDir(path, stateDir + "/" + gcRootsDir + "/auto")) { if (isInDir(path, std::filesystem::path{stateDir.get()} / gcRootsDir / "auto")) {
printInfo("removing stale link from '%1%' to '%2%'", path, target); printInfo("removing stale link from '%1%' to '%2%'", path, target);
unlink(path.c_str()); unlink(path.c_str());
} }