Create dirs with parents
o9000 mrovi9000@gmail.com
3 files changed,
5 insertions(+),
5 deletions(-)
M
src/config.c
→
src/config.c
@@ -1367,7 +1367,7 @@ // According to the XDG Base Directory Specification
// (https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html) // if the user's config directory does not exist, we should create it with permissions set to 0700. if (!g_file_test(g_get_user_config_dir(), G_FILE_TEST_IS_DIR)) - g_mkdir(g_get_user_config_dir(), 0700); + g_mkdir_with_parents(g_get_user_config_dir(), 0700); gchar *path2 = 0; system_dirs = g_get_system_config_dirs();@@ -1384,7 +1384,7 @@ if (path2) {
// copy file in user directory (path1) gchar *dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL); if (!g_file_test(dir, G_FILE_TEST_IS_DIR)) - g_mkdir(dir, 0700); + g_mkdir_with_parents(dir, 0700); g_free(dir); path1 = g_build_filename(g_get_user_config_dir(), "tint2", "tint2rc", NULL);@@ -1400,7 +1400,7 @@
// generate config file gchar *dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL); if (!g_file_test(dir, G_FILE_TEST_IS_DIR)) - g_mkdir(dir, 0700); + g_mkdir_with_parents(dir, 0700); g_free(dir); path1 = g_build_filename(g_get_user_config_dir(), "tint2", "tint2rc", NULL);
M
src/tint2conf/main.c
→
src/tint2conf/main.c
@@ -227,7 +227,7 @@
{ gchar *tint2_config_dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL); if (!g_file_test(tint2_config_dir, G_FILE_TEST_IS_DIR)) - g_mkdir(tint2_config_dir, 0700); + g_mkdir_with_parents(tint2_config_dir, 0700); g_free(tint2_config_dir); }
M
src/tint2conf/theme_view.c
→
src/tint2conf/theme_view.c
@@ -177,7 +177,7 @@ {
{ gchar *tint2_cache_dir = g_build_filename(g_get_user_cache_dir(), "tint2", NULL); if (!g_file_test(tint2_cache_dir, G_FILE_TEST_IS_DIR)) - g_mkdir(tint2_cache_dir, 0700); + g_mkdir_with_parents(tint2_cache_dir, 0700); g_free(tint2_cache_dir); }