# HG changeset patch # User Mikael Berthe # Date 1445105998 -7200 # Node ID 1177b33d45506a285352f75c6c140f1b61dc8f3f # Parent ccd4ffa41a1bfde64496b3ba0600410afcbb6b48 Do not hardcode the default logging location The current configuration directory is used as a base. diff -r ccd4ffa41a1b -r 1177b33d4550 mcabber/mcabber/histolog.c --- a/mcabber/mcabber/histolog.c Sat Oct 17 20:17:30 2015 +0200 +++ b/mcabber/mcabber/histolog.c Sat Oct 17 20:19:58 2015 +0200 @@ -358,7 +358,8 @@ } // hlog_enable() -// Enable logging to files. If root_dir is NULL, then $HOME/.mcabber is used. +// Enable logging to files. If root_dir is NULL, then the subdirectory "histo" +// in mcabber configuration directory is used. // If loadfiles is TRUE, we will try to load buddies history logs from file. void hlog_enable(guint enable, const char *root_dir, guint loadfiles) { @@ -383,9 +384,9 @@ g_free(xp_root_dir); } } else { - char *home = getenv("HOME"); - const char *dir = "/.mcabber/histo/"; - RootDir = g_strdup_printf("%s%s", home, dir); + const char *cfgdir = settings_get_mcabber_config_dir(); + const char *hdir = "/histo/"; + RootDir = g_strdup_printf("%s%s", cfgdir, hdir); } // Check directory permissions (should not be readable by group/others) if (checkset_perm(RootDir, TRUE) == -1) {