summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileSearch.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2015-06-21 16:03:32 -0400
committerJules Blok <jules.blok@gmail.com>2015-06-25 15:17:52 +0200
commit384a1b4e3b63aec988260fdb23e1c48429ee97e5 (patch)
tree0e0347e159b52a962d225bfe11815dea46292179 /Source/Core/Common/FileSearch.cpp
parent86dd81cf6b56203c3674d8fde5c1d52f21652b93 (diff)
Fix DoFileSearch returning the passed-in directories themselves.
Fixes https://code.google.com/p/dolphin-emu/issues/detail?id=8697&can=3
Diffstat (limited to 'Source/Core/Common/FileSearch.cpp')
-rw-r--r--Source/Core/Common/FileSearch.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp
index 13e99fe88a..b5395cf21c 100644
--- a/Source/Core/Common/FileSearch.cpp
+++ b/Source/Core/Common/FileSearch.cpp
@@ -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) {