addAdditionalRoots(): Check each path only once
This commit is contained in:
parent
00f698eb8b
commit
0374d94437
1 changed files with 2 additions and 2 deletions
|
@ -372,9 +372,9 @@ static void addAdditionalRoots(StoreAPI & store, PathSet & roots)
|
||||||
|
|
||||||
string result = runProgram(rootFinder);
|
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)) {
|
if (isInStore(*i)) {
|
||||||
Path path = toStorePath(*i);
|
Path path = toStorePath(*i);
|
||||||
if (roots.find(path) == roots.end() && store.isValidPath(path)) {
|
if (roots.find(path) == roots.end() && store.isValidPath(path)) {
|
||||||
|
|
Loading…
Reference in a new issue