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.
This commit is contained in:
JosJuice 2017-06-26 11:44:23 +02:00
parent be162a3316
commit 382356627a
1 changed files with 2 additions and 0 deletions

View File

@ -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) {