From 0374d9443732c184ab054a926058b9c5b973198f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 26 Apr 2013 12:07:25 +0200 Subject: [PATCH] addAdditionalRoots(): Check each path only once --- src/libstore/gc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 113a7da15..5c5c07e4c 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -372,9 +372,9 @@ static void addAdditionalRoots(StoreAPI & store, PathSet & roots) string result = runProgram(rootFinder); - Strings paths = tokenizeString(result, "\n"); + StringSet paths = tokenizeString(result, "\n"); - foreach (Strings::iterator, i, paths) { + foreach (StringSet::iterator, i, paths) { if (isInStore(*i)) { Path path = toStorePath(*i); if (roots.find(path) == roots.end() && store.isValidPath(path)) {