aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-04-26 12:07:25 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-04-26 12:07:25 +0200
commit0374d9443732c184ab054a926058b9c5b973198f (patch)
treeda0d372c90a7161daf02ceda895b511f914f800f /src/libstore
parent00f698eb8b93c9de50ebbadb946c5bf188e8fa98 (diff)
addAdditionalRoots(): Check each path only once
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/gc.cc4
1 files 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<Strings>(result, "\n");
+ StringSet paths = tokenizeString<StringSet>(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)) {