Add support for quoting "file://%1" like format strings.

This commit is contained in:
Dmitry Timoshkov 2004-06-14 17:54:24 +00:00 committed by Alexandre Julliard
parent 9af2bd4803
commit 5567887fd3
1 changed files with 5 additions and 2 deletions

View File

@ -86,6 +86,9 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
PCWSTR cmd;
LPVOID pv;
TRACE("%p, %d, %s, %s, %p, %p\n", out, len, debugstr_w(fmt),
debugstr_w(lpFile), pidl, args);
while (*fmt)
{
if (*fmt == '%')
@ -136,8 +139,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
else
cmd = lpFile;
/* Add double quotation marks unless we already have them (e.g.: "%1" %* for exefile) */
if (res==out || res[-1]!='"')
/* Add double quotation marks unless we already have them (e.g.: "file://%1" %* for exefile) */
if (res == out || *(fmt + 1) != '"')
{
*res++ = '"';
strcpyW(res, cmd);