Fixed OpenFile returned value when OF_EXIST flag is specified.

This commit is contained in:
Christian Costa 2004-03-20 19:25:39 +00:00 committed by Alexandre Julliard
parent ea7857559c
commit 61f3c740f9
1 changed files with 5 additions and 2 deletions

View File

@ -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
{