From b09e975b4c74c85b5625bb6f81a2b2108accc2d5 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 19 Aug 2013 11:29:58 -0700 Subject: [PATCH] Fix DirectoryIterator when multiple wildcards are used. --- modules/beast_core/files/beast_DirectoryIterator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/beast_core/files/beast_DirectoryIterator.cpp b/modules/beast_core/files/beast_DirectoryIterator.cpp index 7d1829412..ce51b4792 100644 --- a/modules/beast_core/files/beast_DirectoryIterator.cpp +++ b/modules/beast_core/files/beast_DirectoryIterator.cpp @@ -104,8 +104,8 @@ bool DirectoryIterator::next (bool* const isDirResult, bool* const isHiddenResul matches = (whatToLookFor & File::findFiles) != 0; } - // if recursive, we're not relying on the OS iterator to do the wildcard match, so do it now.. - if (matches && isRecursive) + // if we're not relying on the OS iterator to do the wildcard match, do it now.. + if (matches && (isRecursive || wildCards.size() > 1)) matches = fileMatches (wildCards, filename); if (matches && (whatToLookFor & File::ignoreHiddenFiles) != 0)