X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf58daba3897eff9fdbf7477b6bfe90e3dc7a205..848332140be2d53aea32d0702f4c0e06c149d24b:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index ed9b69b1cd..bb97970acc 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -40,7 +40,7 @@ #include #include #include -#if !defined(__WATCOMC__) +#if !wxONLY_WATCOM_EARLIER_THAN(1,4) #if !(defined(_MSC_VER) && (_MSC_VER > 800)) #include #endif @@ -242,8 +242,7 @@ bool wxPathList::Member (const wxString& path) wxString wxPathList::FindValidPath (const wxString& file) { - if (wxFileExists (wxExpandPath(wxFileFunctionsBuffer, file))) - return wxString(wxFileFunctionsBuffer); + wxExpandPath(wxFileFunctionsBuffer, file); wxChar buf[_MAXPATHLEN]; wxStrcpy(buf, wxFileFunctionsBuffer); @@ -252,7 +251,7 @@ wxString wxPathList::FindValidPath (const wxString& file) for (wxStringList::compatibility_iterator node = GetFirst(); node; node = node->GetNext()) { - const wxChar *path = node->GetData(); + const wxString path(node->GetData()); wxStrcpy (wxFileFunctionsBuffer, path); wxChar ch = wxFileFunctionsBuffer[wxStrlen(wxFileFunctionsBuffer)-1]; if (ch != wxT('\\') && ch != wxT('/'))