mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
shell32: Conform to native in SHELL_ArgifyW for unquoted %1 in registry keys.
This commit is contained in:
parent
e0940226cd
commit
9be151c2e9
@ -156,32 +156,11 @@ 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.: "file://%1" %* for exefile) or unless the arg is already
|
||||
enclosed in double quotation marks */
|
||||
if ((res == out || *(fmt + 1) != '"') && *cmd != '"')
|
||||
used += strlenW(cmd);
|
||||
if (used < len)
|
||||
{
|
||||
used++;
|
||||
if (used < len)
|
||||
*res++ = '"';
|
||||
used += strlenW(cmd);
|
||||
if (used < len)
|
||||
{
|
||||
strcpyW(res, cmd);
|
||||
res += strlenW(cmd);
|
||||
}
|
||||
used++;
|
||||
if (used < len)
|
||||
*res++ = '"';
|
||||
}
|
||||
else
|
||||
{
|
||||
used += strlenW(cmd);
|
||||
if (used < len)
|
||||
{
|
||||
strcpyW(res, cmd);
|
||||
res += strlenW(cmd);
|
||||
}
|
||||
strcpyW(res, cmd);
|
||||
res += strlenW(cmd);
|
||||
}
|
||||
}
|
||||
found_p1 = TRUE;
|
||||
|
@ -1064,7 +1064,7 @@ static dde_tests_t dde_tests[] =
|
||||
|
||||
/* Test unquoted %1 in command and ddeexec
|
||||
* (test filename has space) */
|
||||
{"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0xa, 33},
|
||||
{"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0x0, 33},
|
||||
|
||||
/* Test ifexec precedence over ddeexec */
|
||||
{"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]", 0x0, 33},
|
||||
|
Loading…
Reference in New Issue
Block a user