Zhipeng Zhao : explorer: Support '/cd,' command line option.
Alexandre Julliard
julliard at winehq.org
Wed Apr 1 15:50:59 CDT 2020
Module: wine
Branch: master
Commit: 9d79746425ba2e292f85f656227d703672076499
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9d79746425ba2e292f85f656227d703672076499
Author: Zhipeng Zhao <near2see at 163.com>
Date: Fri Mar 27 15:14:52 2020 +0800
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: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/explorer/explorer.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c
index dcd09ac969..763fca381b 100644
--- a/programs/explorer/explorer.c
+++ b/programs/explorer/explorer.c
@@ -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 );
More information about the wine-cvs
mailing list