diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 84ebf76d34..ed9b69b1cd 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -301,7 +301,12 @@ wxFileExists (const wxString& filename) #else // !__WIN32__ wxStructStat st; #ifndef wxNEED_WX_UNISTD_H - return wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG); + return (wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG)) +#ifdef __OS2__ + || (errno == EACCES) // if access is denied something with that name + // exists and is opened in exclusive mode. +#endif + ; #else return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG); #endif diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 451effbc3c..7be190fe44 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -1989,7 +1989,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess, return true; } -#elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || (defined(__DOS__) && defined(__WATCOMC__)) +#elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__)) wxStructStat stBuf; if ( wxStat( GetFullPath().c_str(), &stBuf) == 0 ) {