From 298dd487bb7bc0e0f4f12a3df91906263e506db4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Mar 2005 14:31:12 +0000 Subject: [PATCH] * When finding live paths, the deriver need not be valid. --- src/libstore/gc.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 7f0b07946..a2be189cc 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); } }