Commit 9d797464 authored by Zhipeng Zhao's avatar Zhipeng Zhao Committed by Alexandre Julliard

explorer: Support '/cd,' command line option.

'/cd,' is an undocumented option that seems to have the same effect as '/root,'. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48816. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 59c7e197
......@@ -718,6 +718,7 @@ static void copy_path_root(LPWSTR root, LPWSTR path)
* Command Line parameters are:
* [/n] Opens in single-paned view for each selected items. This is default
* [/e,] Uses Windows Explorer View
* [/cd,object] Specifies the root level of the view
* [/root,object] Specifies the root level of the view
* [/select,object] parent folder is opened and specified object is selected
*/
......@@ -725,6 +726,7 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
{
static const WCHAR arg_n[] = {'/','n'};
static const WCHAR arg_e[] = {'/','e',','};
static const WCHAR arg_cd[] = {'/','c','d',','};
static const WCHAR arg_root[] = {'/','r','o','o','t',','};
static const WCHAR arg_select[] = {'/','s','e','l','e','c','t',','};
static const WCHAR arg_desktop[] = {'/','d','e','s','k','t','o','p'};
......@@ -745,6 +747,11 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
parameters->explorer_mode = TRUE;
p += ARRAY_SIZE( arg_e );
}
else if (wcsncmp(p, arg_cd, ARRAY_SIZE( arg_cd ))==0)
{
p += ARRAY_SIZE( arg_cd );
p = copy_path_string(parameters->root,p);
}
else if (wcsncmp(p, arg_root, ARRAY_SIZE( arg_root ))==0)
{
p += ARRAY_SIZE( arg_root );
......
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