From ff52d7619772ca3ebf07e126248fa599270b2223 Mon Sep 17 00:00:00 2001 From: hogliux Date: Wed, 19 Oct 2016 10:20:21 +0100 Subject: [PATCH] Fixed a bug in DirectoryIterator where the result would be inconsistent between Mac/Window when using a default constructed File object --- modules/juce_core/native/juce_win32_Files.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index 9edd8690a6..5d09584f4b 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -740,7 +740,7 @@ class DirectoryIterator::NativeIterator::Pimpl { public: Pimpl (const File& directory, const String& wildCard) - : directoryWithWildCard (File::addTrailingSeparator (directory.getFullPathName()) + wildCard), + : directoryWithWildCard (directory.getFullPathName().isNotEmpty() ? File::addTrailingSeparator (directory.getFullPathName()) + wildCard : String()), handle (INVALID_HANDLE_VALUE) { }