# HG changeset patch # User Andrey Utkin # Date 1458055481 -7200 # Node ID 1cc88b0efdb9d421fb90e035a3831674e64e1119 # Parent 3f04914d86436042efad7477cf6be0ab67cfcc8d Create history log dir if it doesn't exist Full path is created recursively as needed. diff -r 3f04914d8643 -r 1cc88b0efdb9 mcabber/mcabber/histolog.c --- 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 "