X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..ae901b234c4a0aa7c1777b3bd181dd7f8517ad21:/src/unix/dir.cpp

diff --git a/src/unix/dir.cpp b/src/unix/dir.cpp
index d87bf47002..2581eb1cb9 100644
--- a/src/unix/dir.cpp
+++ b/src/unix/dir.cpp
@@ -115,7 +115,7 @@ wxDirData::~wxDirData()
 
 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
@@ -132,7 +132,7 @@ bool wxDirData::Read(wxString *filename)
             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
@@ -225,9 +225,6 @@ bool wxDir::Open(const wxString& dirname)
 
     if ( !M_DIR->IsOk() )
     {
-        wxLogSysError(_("Can not enumerate files in directory '%s'"),
-                      dirname.c_str());
-
         delete M_DIR;
         m_data = NULL;
 
@@ -290,7 +287,7 @@ bool wxDir::GetNext(wxString *filename) const
     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") );