1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0030403: Application Framework - Overwriting Big BinOcaf Files Does Not Reduce Their Size

OSD_OpenFileDescriptor(), added truncating flag to fopen() flags for std::ios_base::out,
since truncating is implied by C++ output flag.
This fixes misbehavior of OSD_OpenStream() on MinGW-w64 platform.
This commit is contained in:
Benjamin Bihler 2019-07-11 11:16:12 +02:00 committed by bugmaster
parent bc28da5c3a
commit 718d07fe5e

View File

@ -34,14 +34,12 @@ static int OSD_OpenFile_iosMode2FileFlags (::std::ios_base::openmode theMode)
{
aFlags |= O_WRONLY;
aFlags |= O_CREAT;
aFlags |= O_TRUNC;
if (theMode & ::std::ios_base::app)
{
aFlags |= O_APPEND;
}
if (theMode & ::std::ios_base::trunc)
{
aFlags |= O_TRUNC;
}
}
#ifdef _WIN32
if (theMode & ::std::ios_base::binary)