mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Fix DoFileSearch returning the passed-in directories themselves.
Fixes https://code.google.com/p/dolphin-emu/issues/detail?id=8697&can=3
This commit is contained in:
@ -28,7 +28,8 @@ static std::vector<std::string> FileSearchWithTest(const std::vector<std::string
|
||||
for (auto& child : entry.children)
|
||||
DoEntry(child);
|
||||
};
|
||||
DoEntry(top);
|
||||
for (auto& child : top.children)
|
||||
DoEntry(child);
|
||||
}
|
||||
// remove duplicates
|
||||
std::sort(result.begin(), result.end());
|
||||
@ -53,6 +54,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& globs, con
|
||||
});
|
||||
}
|
||||
|
||||
// Result includes the passed directories themselves as well as their subdirectories.
|
||||
std::vector<std::string> FindSubdirectories(const std::vector<std::string>& directories, bool recursive)
|
||||
{
|
||||
return FileSearchWithTest(directories, true, [&](const File::FSTEntry& entry) {
|
||||
|
Reference in New Issue
Block a user