mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Clarify startup.
If mc isn't run as file manager, don't resolve the "other_dir" panel option. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
bea83a1189
commit
9e226f130f
32
src/main.c
32
src/main.c
@ -282,20 +282,6 @@ main (int argc, char *argv[])
|
||||
/* Must be done after load_setup because depends on mc_global.vfs.cd_symlinks */
|
||||
vfs_setup_work_dir ();
|
||||
|
||||
/* Resolve the other_dir panel option. Must be done after vfs_setup_work_dir */
|
||||
{
|
||||
char *buffer;
|
||||
vfs_path_t *vpath;
|
||||
|
||||
buffer = mc_config_get_string (mc_global.panels_config, "Dirs", "other_dir", ".");
|
||||
vpath = vfs_path_from_str (buffer);
|
||||
if (vfs_file_is_local (vpath))
|
||||
saved_other_dir = buffer;
|
||||
else
|
||||
g_free (buffer);
|
||||
vfs_path_free (vpath);
|
||||
}
|
||||
|
||||
/* Set up temporary directory after VFS initialization */
|
||||
mc_tmpdir ();
|
||||
|
||||
@ -310,6 +296,24 @@ main (int argc, char *argv[])
|
||||
goto startup_exit_falure;
|
||||
}
|
||||
|
||||
/* Resolve the other_dir panel option.
|
||||
* 1. Must be done after vfs_setup_work_dir().
|
||||
* 2. Must be done after mc_setup_by_args() because of mc_run_mode.
|
||||
*/
|
||||
if (mc_global.mc_run_mode == MC_RUN_FULL)
|
||||
{
|
||||
char *buffer;
|
||||
vfs_path_t *vpath;
|
||||
|
||||
buffer = mc_config_get_string (mc_global.panels_config, "Dirs", "other_dir", ".");
|
||||
vpath = vfs_path_from_str (buffer);
|
||||
if (vfs_file_is_local (vpath))
|
||||
saved_other_dir = buffer;
|
||||
else
|
||||
g_free (buffer);
|
||||
vfs_path_free (vpath);
|
||||
}
|
||||
|
||||
/* check terminal type
|
||||
* $TERM must be set and not empty
|
||||
* mc_global.tty.xterm_flag is used in init_key() and tty_init()
|
||||
|
Loading…
Reference in New Issue
Block a user