From 91e90aaee004659f7d9eb7f60f6e0c9c077da6d3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 17 Mar 2025 17:56:37 -0400 Subject: [PATCH] Clean up one path computation with `/` operator Because of the previous commit, we need to use `std::filesystem::path` anyways. --- src/libstore/gc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index ac354f3fa..0a86a9d0d 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -245,7 +245,7 @@ void LocalStore::findRoots(const Path & path, std::filesystem::file_type type, R else { target = absPath(target, dirOf(path)); 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); unlink(path.c_str()); }