]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
Some more _BTN changes
[wxWidgets.git] / src / common / filename.cpp
index 64b49c49108d5b7fa32f7706746666093a90c6fb..234ac801380c964f309a0d55bb62e051da451650 100644 (file)
@@ -619,7 +619,7 @@ static int wxOpenWithDeleteOnClose(const wxString& filename)
     HANDLE h = ::CreateFile(filename, access, 0, NULL,
                             disposition, attributes, NULL);
 
-    return wxOpenOSFHandle(h, 0);
+    return wxOpenOSFHandle(h, wxO_BINARY);
 }
 #endif // wxOpenOSFHandle
 
@@ -649,7 +649,7 @@ static bool wxTempOpen(wxFFile *file, const wxString& path, bool *deleteOnClose)
     return file->Open(path, _T("w+b"));
 #else // wx_fdopen
     int fd = wxTempOpen(path, deleteOnClose);
-    if (fd != -1)
+    if (fd == -1)
         return false;
     file->Attach(wx_fdopen(fd, "w+b"));
     return file->IsOpened();
@@ -1793,7 +1793,7 @@ wxString wxFileName::GetLongPath() const
     wxString pathOut,
              path = GetFullPath();
 
-#if defined(__WIN32__) && !defined(__WXMICROWIN__)
+#if defined(__WIN32__) && !defined(__WXWINCE__) && !defined(__WXMICROWIN__)
 
 #if wxUSE_DYNAMIC_LOADER
     typedef DWORD (WINAPI *GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD);
@@ -2216,7 +2216,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
     // not 9x
     bool ok;
     FILETIME ftAccess, ftCreate, ftWrite;
-    if ( IsDir() )
+    if ( IsDir() ) 
     {
         // implemented in msw/dir.cpp
         extern bool wxGetDirectoryTimes(const wxString& dirname,
@@ -2255,6 +2255,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
         return true;
     }
 #elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__))
+    // no need to test for IsDir() here
     wxStructStat stBuf;
     if ( wxStat( GetFullPath().c_str(), &stBuf) == 0 )
     {