all repos — tint2 @ aee90e5b99c850cd252264254b90dc7a066a386a

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

create .config dir if it does not exist (issue #629)
o9000 mrovi9000@gmail.com
commit

aee90e5b99c850cd252264254b90dc7a066a386a

parent

5aa907feeb297a95c1366536c5fa42732b2780dc

1 files changed, 7 insertions(+), 6 deletions(-)

jump to
M src/config.csrc/config.c

@@ -1244,6 +1244,13 @@ }

g_free(path1); // copy tint2rc from system directory to user directory + + fprintf(stderr, "tint2 warning: could not find a config file! Creating a default one.\n"); + // 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); + gchar *path2 = 0; system_dirs = g_get_system_config_dirs(); for (int i = 0; system_dirs[i]; i++) {

@@ -1273,12 +1280,6 @@ return result;

} // generate config file - fprintf(stderr, "tint2 warning: could not find a config file!\n"); - // 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); - 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);