]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dir.cpp
added version info hidden dialog
[wxWidgets.git] / src / msw / dir.cpp
index 2ed4f0e02e3c6671bd79b24a5e77c88ae78bc2a6..5fe20263aafae57965ea216e6f306a9d08aece77 100644 (file)
     static inline FIND_DATA FindFirst(const wxString& spec,
                                       FIND_STRUCT *finddata)
     {
-        return ::FindFirstFile(filespec, &finddata);
+        return ::FindFirstFile(spec, finddata);
     }
 
     static inline bool FindNext(FIND_DATA fd, FIND_STRUCT *finddata)
@@ -267,9 +267,12 @@ bool wxDirData::Read(wxString *filename)
     if ( !IsFindDataOk(m_finddata) )
     {
         // open first
-        wxString filespec;
-        filespec << m_dirname << _T('\\')
-                 << (!m_filespec ? _T("*.*") : m_filespec.c_str());
+        wxString filespec = m_dirname;
+        if ( !wxEndsWithPathSeparator(filespec) )
+        {
+            filespec += _T('\\');
+        }
+        filespec += (!m_filespec ? _T("*.*") : m_filespec.c_str());
 
         m_finddata = FindFirst(filespec, PTR_TO_FINDDATA);