O_BINARY added to wxFile::Create
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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,
|
// 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
|
// otherwise we only create the new file and fail if it already exists
|
||||||
#ifdef __WXMAC__
|
#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
|
#else
|
||||||
int fd = open(wxFNCONV(szFileName),
|
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));
|
ACCESS(accessMode));
|
||||||
#endif
|
#endif
|
||||||
if ( fd == -1 ) {
|
if ( fd == -1 ) {
|
||||||
@@ -260,7 +261,7 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
int fd = open(wxUnix2MacFilename( szFileName ), flags, access);
|
int fd = open(wxUnix2MacFilename( szFileName ), flags, access);
|
||||||
#else
|
#else
|
||||||
int fd = open(wxFNCONV(szFileName), flags ACCESS(accessMode));
|
int fd = open(wxFNCONV(szFileName), flags ACCESS(accessMode));
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user