* When finding live paths, the deriver need not be valid.

This commit is contained in:
Eelco Dolstra 2005-03-25 14:31:12 +00:00
parent ebe342c9c1
commit 298dd487bb

View File

@ -333,8 +333,11 @@ void collectGarbage(GCAction action, PathSet & result)
for (PathSet::iterator i = livePaths.begin(); for (PathSet::iterator i = livePaths.begin();
i != livePaths.end(); ++i) 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); Path deriver = queryDeriver(noTxn, *i);
if (deriver != "") if (deriver != "" && isValidPath(deriver))
computeFSClosure(deriver, livePaths); computeFSClosure(deriver, livePaths);
} }
} }