libstore/worker: pathContentsGood inform about physical store locations

When a user runs a repair or check sequence, they might be confused of
seeing references to a logical /nix/store path rather than the actual
physical store location.

Change-Id: I042031a6159cdd1054e7e200a220bf6c321d5fb8
Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
Raito Bezarius
2025-07-26 20:52:25 +00:00
parent 95ea633547
commit b7a9da96be
+4 -2
View File
@@ -386,7 +386,7 @@ kj::Promise<Result<bool>> Worker::pathContentsGood(const StorePath & path)
try {
auto i = pathContentsGoodCache.find(path);
if (i != pathContentsGoodCache.end()) co_return i->second;
printInfo("checking path '%s'...", store.printStorePath(path));
printInfo("checking path '%s'...", store.toRealPath(store.printStorePath(path)));
auto info = TRY_AWAIT(store.queryPathInfo(path));
bool res;
if (!pathExists(store.printStorePath(path)))
@@ -398,7 +398,9 @@ try {
}
pathContentsGoodCache.insert_or_assign(path, res);
if (!res)
printError("path '%s' is corrupted or missing!", store.printStorePath(path));
printError(
"path '%s' is corrupted or missing!", store.toRealPath(store.printStorePath(path))
);
co_return res;
} catch (...) {
co_return result::current_exception();