diff options
-rw-r--r-- | src/libstore/gc.cc | 2 |
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); } |