Francois Gouget : notepad: Improve handling of quoted filenames.
Module: wine Branch: master Commit: 5bc7b784cbcf386a99f96238a0f488eb0eb9b4ed URL: http://source.winehq.org/git/wine.git/?a=commit;h=5bc7b784cbcf386a99f96238a0... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 10 10:20:19 2008 +0200 notepad: Improve handling of quoted filenames. --- programs/notepad/main.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/programs/notepad/main.c b/programs/notepad/main.c index fb84487..f231f20 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -571,8 +571,13 @@ static void HandleCommandLine(LPWSTR cmdline) if (cmdline[0] == '"') { + WCHAR* wc; cmdline++; - cmdline[lstrlen(cmdline) - 1] = 0; + wc=cmdline; + /* Note: Double-quotes are not allowed in Windows filenames */ + while (*wc && *wc != '"') wc++; + /* On Windows notepad ignores further arguments too */ + *wc = 0; } if (FileExists(cmdline))
participants (1)
-
Alexandre Julliard