mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:45:46 +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
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue