X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b12915c104de03c9fd5102404e35051e9b8609a8..4004f41e3ce1655f9fa05c55a697ac0f8677c23a:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index 4a40785270..ef24f40f83 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -220,10 +220,11 @@ bool wxFile::Create(const wxChar *szFileName, bool bOverwrite, int accessMode) // if bOverwrite we create a new file or truncate the existing one, // otherwise we only create the new file and fail if it already exists #ifdef __WXMAC__ - int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); + int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); #else int fd = open(wxFNCONV(szFileName), - O_WRONLY | O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL) + O_BINARY | O_WRONLY | O_CREAT | + (bOverwrite ? O_TRUNC : O_EXCL) ACCESS(accessMode)); #endif if ( fd == -1 ) { @@ -260,7 +261,7 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) } #ifdef __WXMAC__ - int fd = open(wxUnix2MacFilename( szFileName ), flags, access); + int fd = open(wxUnix2MacFilename( szFileName ), flags, access); #else int fd = open(wxFNCONV(szFileName), flags ACCESS(accessMode)); #endif