This patch moves the set_default/restore_default couple after the defaults have
been set by the init function; this was correctly placed in 1.7.2 and somehow it
got moved to the wrong place, which means that tmpdir (and many other variable)
are not correctly set with their new default value determined from environment
variables (or other logic), so when they get resetted with a 'reset all' call in
.muttrc, they will never have the correct default to fall back to and they will
use the wrong one in init.h
This patch fixes:
- http://bugs.debian.org/865822
- http://bugs.debian.org/865842
Issue #654
Shell = safe_strdup((p = getenv("SHELL")) ? p : "/bin/sh");
}
- /* Set standard defaults */
- for (int i = 0; MuttVars[i].option; i++)
- {
- set_default(&MuttVars[i]);
- restore_default(&MuttVars[i]);
- }
-
#ifdef DEBUG
/* Start up debugging mode if requested from cmdline */
if (debuglevel_cmdline > 0)
Matches = safe_calloc(Matches_listsize, sizeof(char *));
+ /* Set standard defaults */
+ for (int i = 0; MuttVars[i].option; i++)
+ {
+ set_default(&MuttVars[i]);
+ restore_default(&MuttVars[i]);
+ }
+
CurrentMenu = MENU_MAIN;