bool wxDirData::Read(wxString *filename)
{
- dirent *de = (dirent *)NULL; // just to silence compiler warnings
+ dirent *de = NULL; // just to silence compiler warnings
bool matches = false;
// speed up string concatenation in the loop a bit
return false;
#if wxUSE_UNICODE
- de_d_name = wxConvFileName->cMB2WC( de->d_name );
+ de_d_name = wxString(de->d_name, *wxConvFileName);
#else
de_d_name = de->d_name;
#endif
if ( !M_DIR->IsOk() )
{
- wxLogSysError(_("Can not enumerate files in directory '%s'"),
- dirname.c_str());
-
delete M_DIR;
m_data = NULL;
return M_DIR->Read(filename);
}
-bool wxDir::HasSubDirs(const wxString& spec)
+bool wxDir::HasSubDirs(const wxString& spec) const
{
wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );