#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"
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)
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);