From 9e2d9d47bc5ef3d8c850f7758784a003e7ac86e6 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 6 May 2012 16:44:47 +0400 Subject: [PATCH] Ticket #2805: fix of misenterpretation of command line arguments as relative paths. 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 cc717c241..d819e66bf 100644 --- a/src/filemanager/midnight.c +++ b/src/filemanager/midnight.c @@ -617,7 +617,10 @@ create_panels (void) { vfs_path_t *vpath; - vpath = vfs_path_from_str (other_dir); + if (g_path_is_absolute (other_dir)) + vpath = vfs_path_from_str (other_dir); + else + vpath = vfs_path_append_new (original_dir, other_dir, (char *) NULL); mc_chdir (vpath); vfs_path_free (vpath); } @@ -633,7 +636,10 @@ create_panels (void) { vfs_path_t *vpath; - vpath = vfs_path_from_str (current_dir); + if (g_path_is_absolute (current_dir)) + vpath = vfs_path_from_str (current_dir); + else + vpath = vfs_path_append_new (original_dir, current_dir, (char *) NULL); mc_chdir (vpath); vfs_path_free (vpath); } -- 2.11.4.GIT