summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/utils.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bin/utils.c b/src/bin/utils.c
index e45a699..e66299d 100644
--- a/src/bin/utils.c
+++ b/src/bin/utils.c
@@ -14,18 +14,15 @@ theme_path_get(const char *name)
14 static char path2[PATH_MAX] = ""; 14 static char path2[PATH_MAX] = "";
15 15
16 /* use the newer file */ 16 /* use the newer file */
17 struct stat s1, s2; 17 struct stat s2;
18 18
19 snprintf(path1, sizeof(path1) - 1, "%s/themes/%s",
20 elm_app_data_dir_get(), name);
21 snprintf(path2, sizeof(path2) - 1, "%s/terminology/themes/%s", 19 snprintf(path2, sizeof(path2) - 1, "%s/terminology/themes/%s",
22 efreet_config_home_get(), name); 20 efreet_config_home_get(), name);
23 21
24 if (stat(path1, &s1) < 0) return path2; 22 if (stat(path2, &s2) == 0) return path2;
25 if (stat(path2, &s2) < 0) return path1; 23 snprintf(path1, sizeof(path1) - 1, "%s/themes/%s",
26 24 elm_app_data_dir_get(), name);
27 if (s1.st_mtime > s2.st_mtime) return path1; 25 return path1;
28 return path2;
29} 26}
30 27
31Eina_Bool 28Eina_Bool