X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5a1681bfec8912fae00c399f49492d80b946c37..a02dc3e3ff6a99000b29eeac3be32bcf6dd776da:/src/msw/dir.cpp diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 2304b540e5..5fe20263aa 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -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);