about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-03-25T14·31+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-03-25T14·31+0000
commit298dd487bb7bc0e0f4f12a3df91906263e506db4 (patch)
treec324cf43568173f035559ca7202d150b98cfbed5
parentebe342c9c14a06bdc90096847529e744265fae3a (diff)
* When finding live paths, the deriver need not be valid.
-rw-r--r--src/libstore/gc.cc5
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);
         }
     }