Create history log dir if it doesn't exist
Full path is created recursively as needed.
--- a/mcabber/mcabber/histolog.c Sat Feb 27 13:53:01 2016 +0100
+++ b/mcabber/mcabber/histolog.c Tue Mar 15 17:24:41 2016 +0200
@@ -406,9 +406,10 @@
RootDir = g_strdup_printf("%s%s", cfgdir, hdir);
}
+ // Create full directory path in case it is absent.
// Check directory permissions (should not be readable by group/others)
- if (checkset_perm(RootDir, TRUE) == -1) {
- // The directory does not actually exists
+ if (g_mkdir_with_parents(RootDir, S_IRUSR | S_IWUSR | S_IXUSR) ||
+ checkset_perm(RootDir, TRUE) == -1) {
g_free(RootDir);
RootDir = NULL;
scr_LogPrint(LPRINT_LOGNORM, "ERROR: Cannot access "