[Bug 51846] New: Standard library call fopen(..., "wx") not recognized - causes destruction of data
WineHQ Bugzilla
wine-bugs at winehq.org
Wed Oct 6 11:08:39 CDT 2021
https://bugs.winehq.org/show_bug.cgi?id=51846
Bug ID: 51846
Summary: Standard library call fopen(..., "wx") not recognized
- causes destruction of data
Product: Wine
Version: unspecified
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: msvcrt
Assignee: wine-bugs at winehq.org
Reporter: ted at lyncon.se
Distribution: ---
Created attachment 70740
--> https://bugs.winehq.org/attachment.cgi?id=70740
open_excl.cpp
wine-6.16 (Staging)
When running a program that uses the standard (since C11 and C++17) fopen()
mode "wx" to guarantee that opening a file for writing fails if it already
exists, I noticed that wine can't handle that mode. Instead, it prints
"0104:err:msvcrt:msvcrt_get_flags incorrect mode flag: x" and successfully
opens the file - even if it already exists - which destroys the content of the
existing file.
I'm attaching the source code to a small C++17 program that works as expected
when compiled with Visual Studio 2019 (/std:c++17) and running it on Windows 10
natively.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list