]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dir.cpp
gtk 1.2.8 compilation fix
[wxWidgets.git] / src / msw / dir.cpp
index 2304b540e5b6e8097c38d563594812f7d5b51da1..adfa2dd7e31284b383d42e536a6033e79bb1b7e3 100644 (file)
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
+// For _A_SUBDIR, etc.
+#if defined(__BORLANDC__) && defined(__WIN16__)
+#include <dos.h>
+#endif
+
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
@@ -267,9 +272,12 @@ bool wxDirData::Read(wxString *filename)
     if ( !IsFindDataOk(m_finddata) )
     {
         // open first
     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);
 
 
         m_finddata = FindFirst(filespec, PTR_TO_FINDDATA);