aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r--src/libstore/store.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 946be5e02..9f50e597e 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -509,6 +509,14 @@ static Hash queryHash(const Transaction & txn, const Path & storePath)
}
+Hash queryPathHash(const Path & path)
+{
+ if (!isValidPath(path))
+ throw Error(format("path `%1%' is not valid") % path);
+ return queryHash(noTxn, path);
+}
+
+
void registerValidPath(const Transaction & txn,
const Path & _path, const Hash & hash, const PathSet & references,
const Path & deriver)