Create dirs with parents
This commit is contained in:
parent
f4ec61340f
commit
00a5f72857
3 changed files with 5 additions and 5 deletions
|
@ -1367,7 +1367,7 @@ gboolean config_read_default_path()
|
|||
// (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 @@ gboolean config_read_default_path()
|
|||
// 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 @@ gboolean config_read_default_path()
|
|||
// 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);
|
||||
|
|
|
@ -227,7 +227,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ gboolean update_snapshot(gpointer ignored)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue