summaryrefslogtreecommitdiff
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-11-16 12:58:34 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-11-16 13:02:10 +0000
commit7096634a3969fdef8e8b3d13a70d034cc0ea41e8 (patch)
treeaaf0d50bbee02d2e4548583db14d1f36bfff726a /src/bin/efreet
parentf8cf378868cd12f870f2eee2100b96b72c5bb08c (diff)
efreet - consider ctime changes as changes too
some distros do odd things with source desktop files and set their mtime timestamps to 0... thus we can't tell that there is a change. thier ctimes do change, so consider the newer of either of these as the modification time to not miss updates @fix
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreet_desktop_cache_create.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c
index ec7553dcc8..8988168e94 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -70,13 +70,22 @@ cache_add(Eet_File *ef, const char *path, const char *file_id, int priority EINA
70 *changed = 1; 70 *changed = 1;
71 INF(" NEW"); 71 INF(" NEW");
72 } 72 }
73 else if (ecore_file_mod_time(desk->orig_path) != desk->load_time) 73 else
74 { 74 {
75 efreet_desktop_free(desk); 75 struct stat st;
76 *changed = 1; 76 if (!stat(desk->orig_path, &st))
77 desk = efreet_desktop_uncached_new(path); 77 {
78 if (desk) INF(" CHANGED"); 78 time_t modtime = st.st_mtime;
79 else INF(" NO UNCACHED"); 79 if (modtime < st.st_ctime) modtime = st.st_ctime;
80 if (modtime != desk->load_time)
81 {
82 efreet_desktop_free(desk);
83 *changed = 1;
84 desk = efreet_desktop_uncached_new(path);
85 if (desk) INF(" CHANGED");
86 else INF(" NO UNCACHED");
87 }
88 }
80 } 89 }
81 if (!desk) return 1; 90 if (!desk) return 1;
82 if (file_id && old_file_ids && !eina_hash_find(old_file_ids->hash, file_id)) 91 if (file_id && old_file_ids && !eina_hash_find(old_file_ids->hash, file_id))