From fa01db9626a2e7ba97d9fea013f2f80f14251987 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Apr 2024 17:38:29 +0200 Subject: [PATCH] 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". --- src/libfetchers/fs-input-accessor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libfetchers/fs-input-accessor.cc b/src/libfetchers/fs-input-accessor.cc index ee24c621a..d85363808 100644 --- a/src/libfetchers/fs-input-accessor.cc +++ b/src/libfetchers/fs-input-accessor.cc @@ -24,7 +24,10 @@ ref 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)