Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/histolog.c @ 2253:5a107c907e71
Read $HOME/.mcabberrc if there is no mcabber configuration directory
This was broken by ccd4ffa41a1b.
This patch should fix issue #146.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 27 Feb 2016 11:28:24 +0100 |
parents | 2c7cca6dec6a |
children | 1cc88b0efdb9 |
line wrap: on
line diff
--- a/mcabber/mcabber/histolog.c Sat Feb 27 11:02:19 2016 +0100 +++ b/mcabber/mcabber/histolog.c Sat Feb 27 11:28:24 2016 +0100 @@ -397,6 +397,12 @@ } else { const char *cfgdir = settings_get_mcabber_config_dir(); const char *hdir = "/histo/"; + if (!cfgdir) { + scr_LogPrint(LPRINT_LOGNORM, "ERROR: Cannot find out " + "history log directory; logging DISABLED"); + UseFileLogging = FileLoadLogs = FALSE; + return; + } RootDir = g_strdup_printf("%s%s", cfgdir, hdir); } @@ -406,7 +412,7 @@ g_free(RootDir); RootDir = NULL; scr_LogPrint(LPRINT_LOGNORM, "ERROR: Cannot access " - "history log directory, logging DISABLED"); + "history log directory; logging DISABLED"); UseFileLogging = FileLoadLogs = FALSE; } }