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:
@@ -125,6 +125,7 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxString name ;
|
wxString name ;
|
||||||
|
wxString lowerfilespec = m_filespec.Lower();
|
||||||
|
|
||||||
while( noErr == err )
|
while( noErr == err )
|
||||||
{
|
{
|
||||||
@@ -146,6 +147,7 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
break ;
|
break ;
|
||||||
|
|
||||||
name = wxMacHFSUniStrToString( &uniname ) ;
|
name = wxMacHFSUniStrToString( &uniname ) ;
|
||||||
|
wxString lowername = name.Lower();
|
||||||
|
|
||||||
if ( ( name == wxT(".") || name == wxT("..") ) && !(m_flags & wxDIR_DOTDOT) )
|
if ( ( name == wxT(".") || name == wxT("..") ) && !(m_flags & wxDIR_DOTDOT) )
|
||||||
continue;
|
continue;
|
||||||
@@ -167,7 +169,7 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( m_filespec.empty() || m_filespec == wxT("*.*") || m_filespec == wxT("*") )
|
if ( m_filespec.empty() || m_filespec == wxT("*.*") || m_filespec == wxT("*") )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else if ( !wxMatchWild(m_filespec, name , false) )
|
else if ( !wxMatchWild(lowerfilespec, lowername , false) )
|
||||||
{
|
{
|
||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user