about summary refs log tree commit diff
path: root/src/store.cc
diff options
context:
space:
mode:
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);