supporting case insensitive iteration

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-02-15 16:24:13 +00:00
parent 15169ab341
commit bf31b1d6d8

View File

@@ -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 ;
}