about summary refs log tree commit diff
path: root/src/store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-09T16·12+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-09T16·12+0000
commit6011bd0da24c100f86239ed826fa7b496bbdddf8 (patch)
treea97710dbe6f7cacc871443df24fab0b00fbda5e3 /src/store.cc
parent2b95a9dc05d0a943859ba92bb301c294473758f1 (diff)
* Outline of the new scheme for derivate distribution.
Diffstat (limited to 'src/store.cc')
-rw-r--r--src/store.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/store.cc b/src/store.cc
index 095d20430777..38e059a294b5 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -158,6 +158,9 @@ static string queryPathByHashPrefix(Hash hash, const string & prefix)
 }
 
 
+string expandHash(const Hash & hash, const string & outPath = "")
+{
+    
 string queryPathByHash(Hash hash)
 {
     return queryPathByHashPrefix(hash, "/");
@@ -187,8 +190,8 @@ void addToStore(string srcPath, string & dstPath, Hash & hash)
 
 void deleteFromStore(const string & path)
 {
-    string prefix = nixStore + "/";
-    if (string(path, 0, prefix.size()) != prefix)
+    string prefix =  + "/";
+    if (!isInPrefix(path, nixStore))
         throw Error(format("path %1% is not in the store") % path);
 
     unregisterPath(path);