From 188a20f33348a4fd3f5788a445fe565a9b525920 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 23 Mar 2012 14:33:20 +0300 Subject: [PATCH] Ticket #2762: mc ignores second directory argument. Signed-off-by: Andrew Borodin --- src/filemanager/midnight.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c index 786013825..540825596 100644 --- a/src/filemanager/midnight.c +++ b/src/filemanager/midnight.c @@ -608,10 +608,16 @@ create_panels (void) /* The other panel */ if (mc_run_param1 != NULL) { - const char *cd_dir = (original_dir != NULL) ? original_dir : mc_run_param1; vfs_path_t *vpath; - vpath = vfs_path_from_str (cd_dir); + if (original_dir != NULL) + { + vpath = vfs_path_from_str (original_dir); + mc_chdir (vpath); + vfs_path_free (vpath); + } + + vpath = vfs_path_from_str (mc_run_param1); mc_chdir (vpath); vfs_path_free (vpath); } -- 2.11.4.GIT