notepad: Only append .txt to missing files without a dot in them.
This commit is contained in:
parent
ce8e69d4b1
commit
87a871efe4
|
@ -31,6 +31,7 @@
|
|||
#include "main.h"
|
||||
#include "dialog.h"
|
||||
#include "notepad_res.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
NOTEPAD_GLOBALS Globals;
|
||||
static ATOM aFINDMSGSTRING;
|
||||
|
@ -590,7 +591,7 @@ static void HandleCommandLine(LPWSTR cmdline)
|
|||
static const WCHAR txtW[] = { '.','t','x','t',0 };
|
||||
|
||||
/* try to find file with ".txt" extension */
|
||||
if (!lstrcmp(txtW, cmdline + lstrlen(cmdline) - lstrlen(txtW)))
|
||||
if (strchrW(PathFindFileNameW(cmdline), '.'))
|
||||
{
|
||||
file_exists = FALSE;
|
||||
file_name = cmdline;
|
||||
|
|
Loading…
Reference in New Issue