aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-03-25 14:31:12 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-03-25 14:31:12 +0000
commit298dd487bb7bc0e0f4f12a3df91906263e506db4 (patch)
treec324cf43568173f035559ca7202d150b98cfbed5 /src/libstore/gc.cc
parentebe342c9c14a06bdc90096847529e744265fae3a (diff)
* When finding live paths, the deriver need not be valid.
Diffstat (limited to 'src/libstore/gc.cc')
-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 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);
}
}