Fix for CreateTempFileName with wxFFile for Windows. Also _open_osfhandle
requires O_BINARY on Borland, and the others don't seem to mind it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
405be7132c
commit
693bfcafb6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user