|
|
|
@ -84,6 +84,8 @@ static bool IsValidSearchPath(Searchpath sp)
|
|
|
|
|
static void FillValidSearchPaths(bool only_local_path)
|
|
|
|
|
{
|
|
|
|
|
_valid_searchpaths.clear();
|
|
|
|
|
|
|
|
|
|
std::set<std::string> seen{};
|
|
|
|
|
for (Searchpath sp = SP_FIRST_DIR; sp < NUM_SEARCHPATHS; sp++) {
|
|
|
|
|
if (only_local_path) {
|
|
|
|
|
switch (sp) {
|
|
|
|
@ -97,7 +99,11 @@ static void FillValidSearchPaths(bool only_local_path)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (IsValidSearchPath(sp)) _valid_searchpaths.emplace_back(sp);
|
|
|
|
|
if (IsValidSearchPath(sp)) {
|
|
|
|
|
if (seen.count(_searchpaths[sp]) != 0) continue;
|
|
|
|
|
seen.insert(_searchpaths[sp]);
|
|
|
|
|
_valid_searchpaths.emplace_back(sp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|