[Bug 9353] New:
CreateFile with OPEN_ALWAYS on an existing directory sets wrong error code
wine-bugs at winehq.org
wine-bugs at winehq.org
Fri Aug 17 15:31:11 CDT 2007
http://bugs.winehq.org/show_bug.cgi?id=9353
Summary: CreateFile with OPEN_ALWAYS on an existing directory
sets wrong error code
Product: Wine
Version: 0.9.43.
Platform: PC-x86-64
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wine-kernel
AssignedTo: wine-bugs at winehq.org
ReportedBy: lindevel at gmx.net
When I call CreateFile like this:
CreateFile("testdir", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_BACKUP_SEMANTICS, NULL);
with the directory "testdir" existing, it sets ERROR_ACCESS_DENIED, while
Windows XP SP 2 sets ERROR_ALREADY_EXISTS (didn't confirm the Windows side
myself).
The correct flag I should be passing instead of OPEN_ALWAYS is OPEN_EXISTING
(which works on Windows XP as well).
>From a first try to find the cause for this, I believe that it is not in
CreateFile and neither in NtCreateFile, but somewhere in wineserver.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list