Commit 5567887f authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

parent 9af2bd48
...@@ -86,6 +86,9 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp ...@@ -86,6 +86,9 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
PCWSTR cmd; PCWSTR cmd;
LPVOID pv; LPVOID pv;
TRACE("%p, %d, %s, %s, %p, %p\n", out, len, debugstr_w(fmt),
debugstr_w(lpFile), pidl, args);
while (*fmt) while (*fmt)
{ {
if (*fmt == '%') if (*fmt == '%')
...@@ -136,8 +139,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp ...@@ -136,8 +139,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
else else
cmd = lpFile; cmd = lpFile;
/* Add double quotation marks unless we already have them (e.g.: "%1" %* for exefile) */ /* Add double quotation marks unless we already have them (e.g.: "file://%1" %* for exefile) */
if (res==out || res[-1]!='"') if (res == out || *(fmt + 1) != '"')
{ {
*res++ = '"'; *res++ = '"';
strcpyW(res, cmd); strcpyW(res, cmd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment