Fixed OpenFile returned value when OF_EXIST flag is specified.
This commit is contained in:
parent
ea7857559c
commit
61f3c740f9
|
@ -1122,9 +1122,12 @@ success: /* We get here if the open was successful */
|
|||
TRACE("(%s): OK, return = %p\n", name, handle );
|
||||
if (win32)
|
||||
{
|
||||
hFileRet = (HFILE)handle;
|
||||
if (mode & OF_EXIST) /* Return the handle, but close it first */
|
||||
if (mode & OF_EXIST) /* Return TRUE instead of a handle */
|
||||
{
|
||||
CloseHandle( handle );
|
||||
hFileRet = TRUE;
|
||||
}
|
||||
else hFileRet = (HFILE)handle;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue