From 89c782b0c0df6ca9d85207b62318e70729f18e24 Mon Sep 17 00:00:00 2001 From: julia Date: Sat, 18 May 2024 20:16:32 +1000 Subject: Change error messages about 'invalid paths' to 'path does not exist'. Fixes #270. Change-Id: I07d2da41498cfdf324a03af40533044d58c97c7e --- src/libstore/local-fs-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/local-fs-store.cc') diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index b224fc3e9..56f13920c 100644 --- a/src/libstore/local-fs-store.cc +++ b/src/libstore/local-fs-store.cc @@ -23,7 +23,7 @@ struct LocalStoreAccessor : public FSAccessor { auto storePath = store->toStorePath(path).first; if (requireValidPath && !store->isValidPath(storePath)) - throw InvalidPath("path '%1%' is not a valid store path", store->printStorePath(storePath)); + throw InvalidPath("path '%1%' does not exist in the store", store->printStorePath(storePath)); return store->getRealStoreDir() + std::string(path, store->storeDir.size()); } @@ -81,7 +81,7 @@ ref LocalFSStore::getFSAccessor() void LocalFSStore::narFromPath(const StorePath & path, Sink & sink) { if (!isValidPath(path)) - throw Error("path '%s' is not valid", printStorePath(path)); + throw Error("path '%s' does not exist in store", printStorePath(path)); dumpPath(getRealStoreDir() + std::string(printStorePath(path), storeDir.size()), sink); } -- cgit v1.2.3