Use g_mkdir_with_parents instead of mkpath.

This commit is contained in:
Alexander Færøy 2016-10-16 16:14:27 +02:00
commit e12853fd83
No known key found for this signature in database
GPG key ID: E15081D5D3C3DB53
2 changed files with 2 additions and 1 deletions

View file

@ -597,6 +597,7 @@ fi
AH_TEMPLATE(HAVE_GMODULE)
AH_TEMPLATE(HAVE_SOCKS_H, [misc..])
AH_TEMPLATE(HAVE_STATIC_PERL)
AH_TEMPLATE(HAVE_STATIC_OTR)
AH_TEMPLATE(PRIuUOFF_T, [printf()-format for uoff_t, eg. "u" or "lu" or "llu"])
AH_TEMPLATE(UOFF_T_INT, [What type should be used for uoff_t])
AH_TEMPLATE(UOFF_T_LONG)

View file

@ -197,7 +197,7 @@ static void create_module_dir(void)
g_error("Unable to allocate memory for OTR directory path.");
if (stat(dir_path, &statbuf) != 0) {
if (mkpath(dir_path, 0700) != 0)
if (g_mkdir_with_parents(dir_path, 0700) != 0)
g_error("Unable to create OTR directory path.");
} else if (!S_ISDIR(statbuf.st_mode))
g_error("%s is not a directory.\nYou should remove it with command: rm %s", dir_path, dir_path);