X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5a1681bfec8912fae00c399f49492d80b946c37..b81abd0d1d0fcde8db54f8c5e736b2b9daaf2ea0:/src/msw/dir.cpp?ds=sidebyside diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 2304b540e5..adfa2dd7e3 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -28,6 +28,11 @@ #pragma hdrstop #endif +// For _A_SUBDIR, etc. +#if defined(__BORLANDC__) && defined(__WIN16__) +#include +#endif + #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 - 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);