Commit 87a871ef authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

notepad: Only append .txt to missing files without a dot in them.

parent ce8e69d4
......@@ -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;
......
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