diff options
Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r-- | src/libstore/store.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc index 51e2e7e7d2cc..01c724b918ae 100644 --- a/src/libstore/store.cc +++ b/src/libstore/store.cc @@ -217,6 +217,8 @@ void setReferences(const Transaction & txn, const Path & storePath, void queryReferences(const Path & storePath, PathSet & references) { Paths references2; + if (!isValidPath(storePath)) + throw Error(format("path `%1%' is not valid") % storePath); nixDB.queryStrings(noTxn, dbReferences, storePath, references2); references.insert(references2.begin(), references2.end()); } |