From 1dbc29bbe023dab0485b9ffaa634af7ac57fa2d2 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 19 Aug 2013 10:35:51 +0100 Subject: [PATCH] DirectoryIterator fix when multiple wildcards are used. --- modules/juce_core/files/juce_DirectoryIterator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_core/files/juce_DirectoryIterator.cpp b/modules/juce_core/files/juce_DirectoryIterator.cpp index 7da018e1a5..7d6dd4b13f 100644 --- a/modules/juce_core/files/juce_DirectoryIterator.cpp +++ b/modules/juce_core/files/juce_DirectoryIterator.cpp @@ -109,8 +109,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)