about summary refs log tree commit diff
path: root/src/values.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/values.cc')
-rw-r--r--src/values.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/values.cc b/src/values.cc
index 22f84c83e61b..c8a3b58cb9e4 100644
--- a/src/values.cc
+++ b/src/values.cc
@@ -135,6 +135,18 @@ string fetchURL(string url)
 #endif
 
 
+void deleteValue(Hash hash)
+{
+    string name;
+    if (queryDB(nixDB, dbRefs, hash, name)) {
+        string fn = absValuePath(name);
+        deletePath(fn);
+        delDB(nixDB, dbRefs, hash);
+    }
+}
+
+
+/* !!! bad name, "query" implies no side effect => getValuePath() */
 string queryValuePath(Hash hash)
 {
     bool checkedNet = false;