about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-08-11T20·15+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-08-11T20·15+0000
commit92f7dfa5b73e44f7584eaed726927450a29a48b8 (patch)
tree3ddddfcdba2089ee7b1acf6128076bbac22a11b2 /src/libstore/gc.cc
parentd19b6521fc5f28f821562f2f93cf9c772a5d4582 (diff)
* Don't assume that paths returned by the runtime root finder are
  valid.

Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index d646dd3dec28..01d85d4d525e 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -332,7 +332,7 @@ static void addAdditionalRoots(PathSet & roots)
     for (Strings::iterator i = paths.begin(); i != paths.end(); ++i) {
         if (isInStore(*i)) {
             Path path = toStorePath(*i);
-            if (roots.find(path) == roots.end()) {
+            if (roots.find(path) == roots.end() && isValidPath(path)) {
                 debug(format("found additional root `%1%'") % path);
                 roots.insert(path);
             }