Commit 42729bc1 authored by Alexander Scott-Johns's avatar Alexander Scott-Johns Committed by Alexandre Julliard

notepad: Fix trying to open non-existent files with the command line.

parent f57c6037
......@@ -59,7 +59,7 @@ VOID ShowLastError(void)
* Untitled - Notepad if no file is open
* filename - Notepad if a file is given
*/
static void UpdateWindowCaption(void)
void UpdateWindowCaption(void)
{
WCHAR szCaption[MAX_STRING_LEN];
WCHAR szNotepad[MAX_STRING_LEN];
......
......@@ -52,6 +52,7 @@ int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCWSTR szString, DWORD dwFl
/* utility functions */
VOID ShowLastError(void);
void UpdateWindowCaption(void);
BOOL FileExists(LPCWSTR szFilename);
BOOL DoCloseFile(void);
void DoOpenFile(LPCWSTR szFileName);
......@@ -698,7 +698,8 @@ static void HandleCommandLine(LPWSTR cmdline)
{
switch (AlertFileDoesNotExist(file_name)) {
case IDYES:
DoOpenFile(file_name);
SetFileName(file_name);
UpdateWindowCaption();
break;
case IDNO:
......
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