notepad: Fix trying to open non-existent files with the command line.
This commit is contained in:
parent
f57c603798
commit
42729bc1c1
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue