diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-20 17:32:15 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-20 17:32:15 +0100 |
commit | 06f62defe640517267a6a16dd222076c822f3123 (patch) | |
tree | 61e890a69c3cde04d2f354702470231e1b7e18ff /src/libstore/local-store.hh | |
parent | 9c29a2ed35d884cda182cea74aee2a7ee614de93 (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.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index ebf3f6e2b..bb5a9143c 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); |