git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50296
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
access = GENERIC_READ;
shareMode = FILE_SHARE_READ|FILE_SHARE_WRITE;
{
access = GENERIC_READ;
shareMode = FILE_SHARE_READ|FILE_SHARE_WRITE;
- disposition |= OPEN_EXISTING;
+ disposition = OPEN_EXISTING;
}
else if ((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
{
access = GENERIC_WRITE;
}
else if ((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
{
access = GENERIC_WRITE;
+ disposition = OPEN_ALWAYS;
}
else if ((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDWR)
{
access = GENERIC_READ|GENERIC_WRITE;
}
else if ((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDWR)
{
access = GENERIC_READ|GENERIC_WRITE;
+ disposition = OPEN_ALWAYS;
if (oflag & O_APPEND)
{
if ( wxFile::Exists(filename) )
if (oflag & O_APPEND)
{
if ( wxFile::Exists(filename) )
shareMode = FILE_SHARE_READ;
disposition = OPEN_EXISTING;
}
shareMode = FILE_SHARE_READ;
disposition = OPEN_EXISTING;
}
- //else: fall through as write_append is the same as write if the
- // file doesn't exist
}
if (oflag & O_TRUNC)
{
access |= GENERIC_WRITE;
shareMode = 0;
}
if (oflag & O_TRUNC)
{
access |= GENERIC_WRITE;
shareMode = 0;
- disposition = (oflag & O_CREAT) ? CREATE_ALWAYS : TRUNCATE_EXISTING;
+ disposition = oflag & O_CREAT ? CREATE_ALWAYS : TRUNCATE_EXISTING;
}
else if (oflag & O_CREAT)
{
}
else if (oflag & O_CREAT)
{