Module: wine Branch: master Commit: 4ea5fce0831ebbe188c88e03fbdda00e6481eecf URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ea5fce0831ebbe188c88e03fb...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Fri Aug 31 16:02:01 2007 +0900
notepad: We pass OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST to GetOpenFileName, so there is no point in testing file existence.
---
programs/notepad/dialog.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)
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 @@ 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); }