about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-20T16·32+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-20T16·32+0100
commit06f62defe640517267a6a16dd222076c822f3123 (patch)
tree61e890a69c3cde04d2f354702470231e1b7e18ff /src/libstore/local-store.hh
parent9c29a2ed35d884cda182cea74aee2a7ee614de93 (diff)
Yet another rewrite of the garbage collector
But this time it's *obviously* correct!  No more segfaults due to
infinite recursions for sure, etc.

Also, move directories to /nix/store/trash instead of renaming them to
/nix/store/bla-gc-<pid>.  Then we can just delete /nix/store/trash at
the end.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index ebf3f6e2b4e7..bb5a9143ceef 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -276,7 +276,11 @@ private:
 
     void deleteGarbage(GCState & state, const Path & path);
 
-    bool tryToDelete(GCState & state, const Path & path);
+    void tryToDelete(GCState & state, const Path & path);
+
+    bool canReachRoot(GCState & state, PathSet & visited, const Path & path);
+
+    void deletePathRecursive(GCState & state, const Path & path);
 
     bool isActiveTempFile(const GCState & state,
         const Path & path, const string & suffix);