From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Fri, 15 Feb 2008 16:24:13 +0000 (+0000)
Subject: supporting case insensitive iteration
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bf31b1d6d809287f3e874d29cf1bc576a27b4290

supporting case insensitive iteration

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/mac/carbon/dirmac.cpp b/src/mac/carbon/dirmac.cpp
index 979f68a40e..52e9a61e0f 100644
--- a/src/mac/carbon/dirmac.cpp
+++ b/src/mac/carbon/dirmac.cpp
@@ -125,6 +125,7 @@ bool wxDirData::Read(wxString *filename)
     }
 
     wxString name ;
+    wxString lowerfilespec = m_filespec.Lower();
 
     while( noErr == err )
     {
@@ -146,6 +147,7 @@ bool wxDirData::Read(wxString *filename)
             break ;
 
         name = wxMacHFSUniStrToString( &uniname ) ;
+        wxString lowername = name.Lower();
 
         if ( ( name == wxT(".") || name == wxT("..") ) && !(m_flags & wxDIR_DOTDOT) )
             continue;
@@ -167,7 +169,7 @@ bool wxDirData::Read(wxString *filename)
         if ( m_filespec.empty() || m_filespec == wxT("*.*") || m_filespec == wxT("*") )
         {
         }
-        else if ( !wxMatchWild(m_filespec, name , false) )
+        else if ( !wxMatchWild(lowerfilespec, lowername , false) )
         {
             continue ;
         }