Module: wine Branch: master Commit: 87a871efe49a5b976f1b56fd61b17378e1be01f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=87a871efe49a5b976f1b56fd61...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Fri Sep 5 12:48:33 2008 +0200
notepad: Only append .txt to missing files without a dot in them.
---
programs/notepad/main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/programs/notepad/main.c b/programs/notepad/main.c index f231f20..a9d3c3b 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -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;