]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dir.cpp
Added wxDataViewListIndexModel::RowsDeleted() and various related corrections
[wxWidgets.git] / src / msw / dir.cpp
index 3fd7ebb9d47818b78a8c09f304f05e88371f21dd..5525d72a611517124ccef1474efe02717e140c28 100644 (file)
@@ -62,7 +62,7 @@ static inline void FreeFindData(FIND_DATA fd)
 static inline FIND_DATA FindFirst(const wxString& spec,
                                       FIND_STRUCT *finddata)
 {
-        return ::FindFirstFile(spec, finddata);
+        return ::FindFirstFile(spec.fn_str(), finddata);
 }
 
 static inline bool FindNext(FIND_DATA fd, FIND_STRUCT *finddata)
@@ -184,7 +184,10 @@ bool wxDirData::Read(wxString *filename)
         {
             filespec += _T('\\');
         }
-        filespec += (!m_filespec ? _T("*.*") : m_filespec.c_str());
+        if ( !m_filespec )
+            filespec += _T("*.*");
+        else
+            filespec += m_filespec;
 
         m_finddata = FindFirst(filespec, PTR_TO_FINDDATA);
 
@@ -374,9 +377,15 @@ extern bool
 wxGetDirectoryTimes(const wxString& dirname,
                     FILETIME *ftAccess, FILETIME *ftCreate, FILETIME *ftMod)
 {
+#ifdef __WXWINCE__
+    // FindFirst() is going to fail
+    wxASSERT_MSG( !dirname.empty(),
+                  _T("incorrect directory name format in wxGetDirectoryTimes") );
+#else
     // FindFirst() is going to fail
     wxASSERT_MSG( !dirname.empty() && dirname.Last() != _T('\\'),
                   _T("incorrect directory name format in wxGetDirectoryTimes") );
+#endif
 
     FIND_STRUCT fs;
     FIND_DATA fd = FindFirst(dirname, &fs);