Ticket #2762: mc ignores second directory argument.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-03-23 14:33:20 +03:00
parent 539f92cd97
commit 188a20f333

View File

@ -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);
}