Commit 4ea5fce0 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

notepad: We pass OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST to GetOpenFileName, so…

notepad: We pass OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST to GetOpenFileName, so there is no point in testing file existence.
parent ee747f3d
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment