notepad: Improve handling of quoted filenames.
This commit is contained in:
parent
d93fa6a1e7
commit
5bc7b784cb
|
@ -571,8 +571,13 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||||
|
|
||||||
if (cmdline[0] == '"')
|
if (cmdline[0] == '"')
|
||||||
{
|
{
|
||||||
|
WCHAR* wc;
|
||||||
cmdline++;
|
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))
|
if (FileExists(cmdline))
|
||||||
|
|
Loading…
Reference in New Issue