From 40b5936691fe2448dea0080e2319cc340bc7c65c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Jun 2003 14:56:12 +0000 Subject: * Realisation of Derive(...) expressions. --- src/values.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/values.cc') 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); } -- cgit 1.4.1