From 92f7dfa5b73e44f7584eaed726927450a29a48b8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 11 Aug 2006 20:15:20 +0000 Subject: [PATCH] * Don't assume that paths returned by the runtime root finder are valid. --- src/libstore/gc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index d646dd3dec..01d85d4d52 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); }