diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-06-27T14·56+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-06-27T14·56+0000 |
commit | 40b5936691fe2448dea0080e2319cc340bc7c65c (patch) | |
tree | 66144e3af56bc1d7035134b85f5e00641ab305e0 /src/values.cc | |
parent | 3da9687854e029e9df3b612fd592d2d5a622bb20 (diff) |
* Realisation of Derive(...) expressions.
Diffstat (limited to 'src/values.cc')
-rw-r--r-- | src/values.cc | 15 |
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); } |