Ticket #3021: mc segfaults when mc's tempdir doesn't belong to the correct user.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-06-14 13:49:47 +04:00
parent 1db4f7bb52
commit e7fd5bcaa4

View File

@ -153,9 +153,6 @@ OS_Setup (void)
mc_global.sysconfig_dir = g_strdup (SYSCONFDIR); mc_global.sysconfig_dir = g_strdup (SYSCONFDIR);
mc_global.share_data_dir = g_strdup (DATADIR); mc_global.share_data_dir = g_strdup (DATADIR);
/* Set up temporary directory */
mc_tmpdir ();
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -298,6 +295,9 @@ main (int argc, char *argv[])
vfs_plugins_init (); vfs_plugins_init ();
vfs_setup_work_dir (); vfs_setup_work_dir ();
/* Set up temporary directory after VFS initialization */
mc_tmpdir ();
/* do this after vfs initialization due to mc_setctl() call in mc_setup_by_args() */ /* do this after vfs initialization due to mc_setctl() call in mc_setup_by_args() */
if (!mc_setup_by_args (argc, argv, &error)) if (!mc_setup_by_args (argc, argv, &error))
{ {