notepad: We pass OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST to GetOpenFileName, so there is no point in testing file existence.

This commit is contained in:
Dmitry Timoshkov 2007-08-31 16:02:01 +09:00 committed by Alexandre Julliard
parent ee747f3d70
commit 4ea5fce083
1 changed files with 3 additions and 7 deletions

View File

@ -217,7 +217,7 @@ void DoOpenFile(LPCWSTR szFileName)
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
{
ShowLastError();
AlertFileNotFound(szFileName);
return;
}
@ -318,12 +318,8 @@ VOID DIALOG_FileOpen(VOID)
openfilename.lpstrDefExt = szDefaultExt;
if (GetOpenFileName(&openfilename)) {
if (FileExists(openfilename.lpstrFile))
DoOpenFile(openfilename.lpstrFile);
else
AlertFileNotFound(openfilename.lpstrFile);
}
if (GetOpenFileName(&openfilename))
DoOpenFile(openfilename.lpstrFile);
}