X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5a1681bfec8912fae00c399f49492d80b946c37..69231000be8d209bb8ea1f6aaa1ff665a270e351:/src/msw/dir.cpp 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);