Revert previous change, OF_EXIST really returns HFILE_ERROR.

This commit is contained in:
Alexandre Julliard 2005-10-18 10:39:15 +00:00
parent bb05f9e9eb
commit 7886cacbf5
2 changed files with 2 additions and 5 deletions

View File

@ -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;
}

View File

@ -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());
}