- if (save_file_config) {
- fprintf(stderr, "tint2 error : enable to write $HOME/.config/tint2/tint2rc\n");
- exit(0);
- }
- // check old tintrc config file
- path1 = g_build_filename (g_get_user_config_dir(), "tint", "tintrc", NULL);
- if (g_file_test (path1, G_FILE_TEST_EXISTS)) {
- save_file_config = 1;
- old_task_font = 0;
- old_time1_font = 0;
- old_time2_font = 0;
- config_read_file (path1);
- save_config();
- if (old_task_font) g_free(old_task_font);
- if (old_time1_font) g_free(old_time1_font);
- if (old_time2_font) g_free(old_time2_font);
- goto deb;
- }
- else {
- path2 = 0;
- system_dirs = g_get_system_config_dirs();
- for (i = 0; system_dirs[i]; i++) {
- path2 = g_build_filename(system_dirs[i], "tint2", "tint2rc", NULL);
-
- if (g_file_test(path2, G_FILE_TEST_EXISTS)) break;
- g_free (path2);
- path2 = 0;
- }
+ g_free(path1);
+ if (save_file_config) {
+ fprintf(stderr, "tint2 exit : enable to write $HOME/.config/tint2/tint2rc\n");
+ exit(0);
+ }
+
+ // check old tintrc config file
+ path1 = g_build_filename (g_get_user_config_dir(), "tint", "tintrc", NULL);
+ if (g_file_test (path1, G_FILE_TEST_EXISTS)) {
+ save_file_config = 1;
+ old_task_font = 0;
+ old_time1_font = 0;
+ old_time2_font = 0;
+ config_read_file (path1);
+ save_config();
+ if (old_task_font) g_free(old_task_font);
+ if (old_time1_font) g_free(old_time1_font);
+ if (old_time2_font) g_free(old_time2_font);
+ g_free(path1);
+ goto deb;
+ }