notepad: We pass OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST to GetOpenFileName, so there is no point in testing file existence.
This commit is contained in:
parent
ee747f3d70
commit
4ea5fce083
|
@ -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))
|
||||
if (GetOpenFileName(&openfilename))
|
||||
DoOpenFile(openfilename.lpstrFile);
|
||||
else
|
||||
AlertFileNotFound(openfilename.lpstrFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue