mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 16:42:45 +00:00
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 "main.h"
|
||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
#include "notepad_res.h"
|
#include "notepad_res.h"
|
||||||
|
#include "wine/unicode.h"
|
||||||
|
|
||||||
NOTEPAD_GLOBALS Globals;
|
NOTEPAD_GLOBALS Globals;
|
||||||
static ATOM aFINDMSGSTRING;
|
static ATOM aFINDMSGSTRING;
|
||||||
|
@ -590,7 +591,7 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||||
static const WCHAR txtW[] = { '.','t','x','t',0 };
|
static const WCHAR txtW[] = { '.','t','x','t',0 };
|
||||||
|
|
||||||
/* try to find file with ".txt" extension */
|
/* try to find file with ".txt" extension */
|
||||||
if (!lstrcmp(txtW, cmdline + lstrlen(cmdline) - lstrlen(txtW)))
|
if (strchrW(PathFindFileNameW(cmdline), '.'))
|
||||||
{
|
{
|
||||||
file_exists = FALSE;
|
file_exists = FALSE;
|
||||||
file_name = cmdline;
|
file_name = cmdline;
|
||||||
|
|
Loading…
Reference in a new issue