mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-15 21:41:43 +00: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:
parent
86dd81cf6b
commit
384a1b4e3b
2 changed files with 5 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue