summaryrefslogtreecommitdiff
path: root/src/bin/utils.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-08-11 13:15:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-08-11 13:15:16 +0900
commit4b25721a1d5b1a895ca1cf7831e566c67a44894c (patch)
treefa80e69745e4510cf84ce3c116312678682710a4 /src/bin/utils.c
parentfe58cd058b8ea4de70f519e608f40aef3ea09605 (diff)
terminology themes - use theme in home dir over system one always
checking modified time between user and system themes is just not a good idea - we never do this anywhere in e. user installed theme alwasy overrides system one. modified time is not relevant.
Diffstat (limited to 'src/bin/utils.c')
-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