mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 04:08:29 +00:00
[KERNEL32]
Use ERROR_SUCCESS instead of 0. Dedicated to Pierre. svn path=/trunk/; revision=54258
This commit is contained in:
parent
7d118f02b6
commit
3c1d785188
|
@ -361,15 +361,15 @@ HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
|
||||||
*/
|
*/
|
||||||
if (dwCreationDisposition == FILE_OPEN_IF)
|
if (dwCreationDisposition == FILE_OPEN_IF)
|
||||||
{
|
{
|
||||||
SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : 0);
|
SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
else if (dwCreationDisposition == FILE_OVERWRITE_IF)
|
else if (dwCreationDisposition == FILE_OVERWRITE_IF)
|
||||||
{
|
{
|
||||||
SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : 0);
|
SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetLastError(0);
|
SetLastError(ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FileHandle;
|
return FileHandle;
|
||||||
|
|
Loading…
Reference in a new issue