]> git.saurik.com Git - wxWidgets.git/commitdiff
Some OS/2 specific improvements.
authorStefan Neis <Stefan.Neis@t-online.de>
Sun, 15 Jan 2006 22:16:02 +0000 (22:16 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 15 Jan 2006 22:16:02 +0000 (22:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filefn.cpp
src/common/filename.cpp

index 84ebf76d347f062e0b60a00edc836bc9b250da0f..ed9b69b1cd6703381dd20499ccb3b198c7983d14 100644 (file)
@@ -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
index 451effbc3c96c5dc52de539211f32f979eaeb1b0..7be190fe44bbfa1679c169a2898ee80619f454be 100644 (file)
@@ -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 )
     {