diff options
author | julia <midnight@trainwit.ch> | 2024-06-16 04:29:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-06-16 04:29:13 +0000 |
commit | dd70044cde0bee5cd66fca6347e294f6c7724001 (patch) | |
tree | 3327a2512e287fdffd94fd5b26d3bb51ee73fc11 /src/libstore/local-fs-store.cc | |
parent | b4035ed1d19a2a77a775a65c3c7af125007dae2a (diff) | |
parent | 89c782b0c0df6ca9d85207b62318e70729f18e24 (diff) |
Merge changes I07d2da41,I864d7340,I86612c64 into main
* changes:
Change error messages about 'invalid paths' to 'path does not exist'.
Add a clearer error message for InvalidPathError during evaluation
Harmonise the Store::queryPathInfoUncached interface
Diffstat (limited to 'src/libstore/local-fs-store.cc')
-rw-r--r-- | src/libstore/local-fs-store.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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<FSAccessor> 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); } |