Revert previous change, OF_EXIST really returns HFILE_ERROR.
This commit is contained in:
parent
bb05f9e9eb
commit
7886cacbf5
|
@ -2071,8 +2071,5 @@ HFILE WINAPI OpenFile( LPCSTR name, OFSTRUCT *ofs, UINT mode )
|
|||
error: /* We get here if there was an error opening the file */
|
||||
ofs->nErrCode = GetLastError();
|
||||
WARN("(%s): return = HFILE_ERROR error= %d\n", name,ofs->nErrCode );
|
||||
if (mode & OF_EXIST)
|
||||
return FALSE;
|
||||
else
|
||||
return HFILE_ERROR;
|
||||
return HFILE_ERROR;
|
||||
}
|
||||
|
|
|
@ -1410,7 +1410,7 @@ static void test_OpenFile_exists(void)
|
|||
}
|
||||
|
||||
hFile = OpenFile(".\\foo-bar-foo.baz", &ofs, OF_EXIST);
|
||||
ok( hFile == FALSE, "hFile != FALSE : %ld\n", GetLastError());
|
||||
ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %ld\n", GetLastError());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue