]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
fixed wxOverlay to handle wxWindowDC/wxClientDC in the same way wxMac does
[wxWidgets.git] / src / common / filename.cpp
index 64b49c49108d5b7fa32f7706746666093a90c6fb..cd32280ec627343faddc355a7055fce62820ce6e 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();
@@ -2216,7 +2216,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
     // not 9x
     bool ok;
     FILETIME ftAccess, ftCreate, ftWrite;
-    if ( IsDir() )
+    if ( DirExists() ) // Don't use IsDir, because it returns false even if it's a directory
     {
         // implemented in msw/dir.cpp
         extern bool wxGetDirectoryTimes(const wxString& dirname,