explorer: Support a quoted /desktop option.
Workaround for Worms Armageddon which uses an invalid but previously supported syntax. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1063623dfb
commit
91a394a616
|
@ -682,6 +682,7 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
|
||||||
static const WCHAR arg_root[] = {'/','r','o','o','t',','};
|
static const WCHAR arg_root[] = {'/','r','o','o','t',','};
|
||||||
static const WCHAR arg_select[] = {'/','s','e','l','e','c','t',','};
|
static const WCHAR arg_select[] = {'/','s','e','l','e','c','t',','};
|
||||||
static const WCHAR arg_desktop[] = {'/','d','e','s','k','t','o','p'};
|
static const WCHAR arg_desktop[] = {'/','d','e','s','k','t','o','p'};
|
||||||
|
static const WCHAR arg_desktop_quotes[] = {'"','/','d','e','s','k','t','o','p'};
|
||||||
|
|
||||||
LPWSTR p = commandline;
|
LPWSTR p = commandline;
|
||||||
|
|
||||||
|
@ -716,6 +717,12 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
|
||||||
p += sizeof(arg_desktop)/sizeof(WCHAR);
|
p += sizeof(arg_desktop)/sizeof(WCHAR);
|
||||||
manage_desktop( p ); /* the rest of the command line is handled by desktop mode */
|
manage_desktop( p ); /* the rest of the command line is handled by desktop mode */
|
||||||
}
|
}
|
||||||
|
/* workaround for Worms Armageddon that hardcodes a /desktop option with quotes */
|
||||||
|
else if (strncmpW(p, arg_desktop_quotes, sizeof(arg_desktop_quotes)/sizeof(WCHAR))==0)
|
||||||
|
{
|
||||||
|
p += sizeof(arg_desktop_quotes)/sizeof(WCHAR);
|
||||||
|
manage_desktop( p ); /* the rest of the command line is handled by desktop mode */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* left over command line is generally the path to be opened */
|
/* left over command line is generally the path to be opened */
|
||||||
|
|
Loading…
Reference in New Issue