about summary refs log tree commit diff
path: root/src/values.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-06-27T14·56+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-06-27T14·56+0000
commit40b5936691fe2448dea0080e2319cc340bc7c65c (patch)
tree66144e3af56bc1d7035134b85f5e00641ab305e0 /src/values.cc
parent3da9687854e029e9df3b612fd592d2d5a622bb20 (diff)
* Realisation of Derive(...) expressions.
Diffstat (limited to 'src/values.cc')
-rw-r--r--src/values.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/values.cc b/src/values.cc
index e23624ce5f43..fe65b977eaec 100644
--- a/src/values.cc
+++ b/src/values.cc
@@ -127,16 +127,13 @@ string fetchURL(string url)
 #endif
 
 
-void deleteFromStore(Hash hash)
+void deleteFromStore(const string & path)
 {
-    string fn;
-    if (queryDB(nixDB, dbRefs, hash, fn)) {
-        string prefix = nixStore + "/";
-        if (string(fn, prefix.size()) != prefix)
-            throw Error("path " + fn + " is not in the store");
-        deletePath(fn);
-        delDB(nixDB, dbRefs, hash);
-    }
+    string prefix = nixStore + "/";
+    if (string(path, 0, prefix.size()) != prefix)
+        throw Error(format("path %1% is not in the store") % path);
+    deletePath(path);
+//     delDB(nixDB, dbRefs, hash);
 }