notepad: We pass OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST to GetOpenFileName, so there is no point in testing file existence.
diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c
index 0a62c5e..c21c2d7 100644
--- a/programs/notepad/dialog.c
+++ b/programs/notepad/dialog.c
@@ -217,7 +217,7 @@
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
{
- ShowLastError();
+ AlertFileNotFound(szFileName);
return;
}
@@ -318,12 +318,8 @@
openfilename.lpstrDefExt = szDefaultExt;
- if (GetOpenFileName(&openfilename)) {
- if (FileExists(openfilename.lpstrFile))
- DoOpenFile(openfilename.lpstrFile);
- else
- AlertFileNotFound(openfilename.lpstrFile);
- }
+ if (GetOpenFileName(&openfilename))
+ DoOpenFile(openfilename.lpstrFile);
}