]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
fixed stupid bug in tab traversal code which totally broke it whenever mouse was...
[wxWidgets.git] / src / common / filename.cpp
index 57907ce9e2dc2af7c1a093f929bd8073f4479130..6abcd26d01344e435f06d916450c797c223d21bb 100644 (file)
     #include <unistd.h>
 #endif
 
+#ifdef __MWERKS__
+    #include <stat.h>
+    #include <unistd.h>
+    #include <unix.h>
+#endif
+
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -498,8 +504,7 @@ bool wxFileName::SameAs( const wxFileName &filepath, wxPathFormat format)
 bool wxFileName::IsCaseSensitive( wxPathFormat format )
 {
     // only DOS and OpenVMS filenames are case-sensitive
-    return ( GetFormat(format) != wxPATH_DOS &
-            GetFormat(format) != wxPATH_VMS );
+    return GetFormat(format) != wxPATH_DOS && GetFormat(format) != wxPATH_VMS;
 }
 
 bool wxFileName::IsRelative( wxPathFormat format )
@@ -1017,7 +1022,20 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
                           wxDateTime *dtMod,
                           wxDateTime *dtChange) const
 {
-#if defined(__UNIX_LIKE__)
+#if defined(__UNIX_LIKE__) 
+    wxStructStat stBuf;
+    if ( wxStat(GetFullPath(), &stBuf) == 0 )
+    {
+        if ( dtAccess )
+            dtAccess->Set(stBuf.st_atime);
+        if ( dtMod )
+            dtMod->Set(stBuf.st_mtime);
+        if ( dtChange )
+            dtChange->Set(stBuf.st_ctime);
+
+        return TRUE;
+    }
+#elif defined(__WXMAC__)
     wxStructStat stBuf;
     if ( wxStat(GetFullPath(), &stBuf) == 0 )
     {