mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[KERNEL32]
CreateFile has to set last error on success. Fixes kernel32:file test cancellation. svn path=/trunk/; revision=54257
This commit is contained in:
parent
f8459fbb45
commit
7d118f02b6
1 changed files with 5 additions and 1 deletions
|
@ -146,7 +146,7 @@ HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
|
|||
|| 0 == _wcsicmp(L"CONIN$", lpFileName))
|
||||
{
|
||||
return OpenConsoleW(lpFileName,
|
||||
dwDesiredAccess,
|
||||
dwDesiredAccess,
|
||||
lpSecurityAttributes ? lpSecurityAttributes->bInheritHandle : FALSE,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE);
|
||||
}
|
||||
|
@ -367,6 +367,10 @@ HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
|
|||
{
|
||||
SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLastError(0);
|
||||
}
|
||||
|
||||
return FileHandle;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue