diff options
| author | comex <comexk@gmail.com> | 2015-06-21 16:03:32 -0400 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2015-06-21 16:07:56 -0400 |
| commit | acd6cb79a4418ac0f0d5c6e70f210363aafa62f4 (patch) | |
| tree | e120998c831db8a4fd293451f76e8598cd8f2955 /Source/Core/Common/FileSearch.cpp | |
| parent | f6d27a5ce86af2c319cc51f5cc09ec8f15f41d3e (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.cpp | 4 |
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) { |
