diff options
| author | JosJuice <josjuice@gmail.com> | 2017-06-26 11:44:23 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-06-26 11:44:23 +0200 |
| commit | 382356627ae06e8b4a84d8ff474d7b4cd279b284 (patch) | |
| tree | 71356e704495d16c96f78aa639b5f04c74cab899 /Source/Core/Common/FileSearch.cpp | |
| parent | be162a331698b8e68354c40c90bd250beac39056 (diff) | |
FileSearch: Check isDirectory in the non-Windows code
c5fa470 made the extension check discard directories, but
only in the new code that currently only is used on Windows.
Let's add an equivalent check in the old code so that the
behavior is consistent across platforms.
Diffstat (limited to 'Source/Core/Common/FileSearch.cpp')
| -rw-r--r-- | Source/Core/Common/FileSearch.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index ffae68b718..0a8d0b369c 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -52,6 +52,8 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie return FileSearchWithTest(directories, recursive, [&](const File::FSTEntry& entry) { if (accept_all) return true; + if (entry.isDirectory) + return false; std::string name = entry.virtualName; std::transform(name.begin(), name.end(), name.begin(), ::tolower); return std::any_of(exts.begin(), exts.end(), [&](const std::string& ext) { |
