diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-03-25T14·31+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-03-25T14·31+0000 |
commit | 298dd487bb7bc0e0f4f12a3df91906263e506db4 (patch) | |
tree | c324cf43568173f035559ca7202d150b98cfbed5 /src/libstore/gc.cc | |
parent | ebe342c9c14a06bdc90096847529e744265fae3a (diff) |
* When finding live paths, the deriver need not be valid.
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 7f0b07946700..a2be189cc1ab 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -333,8 +333,11 @@ void collectGarbage(GCAction action, PathSet & result) for (PathSet::iterator i = livePaths.begin(); i != livePaths.end(); ++i) { + /* Note that the deriver need not be valid (e.g., if we + previously ran the collector with `gcKeepDerivations' + turned off). */ Path deriver = queryDeriver(noTxn, *i); - if (deriver != "") + if (deriver != "" && isValidPath(deriver)) computeFSClosure(deriver, livePaths); } } |