StorePathAccessor: Fix path display

Set the prefix to the store path to fix messages like "copying '/' to
the store" to "copying '/nix/store/bla' to the store".
This commit is contained in:
Eelco Dolstra 2024-04-15 17:38:29 +02:00
parent d2a07a96ba
commit fa01db9626

View File

@ -24,7 +24,10 @@ ref<InputAccessor> makeStorePathAccessor(
const StorePath & storePath)
{
// FIXME: should use `store->getFSAccessor()`
return makeFSInputAccessor(std::filesystem::path { store->toRealPath(storePath) });
auto root = std::filesystem::path { store->toRealPath(storePath) };
auto accessor = makeFSInputAccessor(root);
accessor->setPathDisplay(root);
return accessor;
}
SourcePath getUnfilteredRootPath(CanonPath path)