From: englebass Date: Tue, 30 Mar 2010 10:51:35 +0000 (+0000) Subject: efreet: Check source of desktop X-Git-Tag: 2.0_alpha~51^2~445 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=acfc78020620332580ee410a052d8bb6c9dbb4b2;p=framework%2Fuifw%2Fefreet.git efreet: Check source of desktop Flag changed if efreet_desktop_new doesn't return a eet cached value. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@47584 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/efreet_desktop_cache_create.c b/src/bin/efreet_desktop_cache_create.c index a0bb6bf..eea7875 100644 --- a/src/bin/efreet_desktop_cache_create.c +++ b/src/bin/efreet_desktop_cache_create.c @@ -37,7 +37,6 @@ cache_add(const char *path, const char *file_id, int priority __UNUSED__, int *c { Efreet_Desktop *desk; char *ext; - long long mtime; ext = strrchr(path, '.'); if (!ext || (strcmp(ext, ".desktop") && strcmp(ext, ".directory"))) return 1; @@ -48,8 +47,12 @@ cache_add(const char *path, const char *file_id, int priority __UNUSED__, int *c if (desk) efreet_desktop_free(desk); return 1; } - mtime = ecore_file_mod_time(path); - if (mtime != desk->load_time) + if (!desk->eet) + { + /* This file isn't in cache */ + *changed = 1; + } + else if (ecore_file_mod_time(desk->orig_path) != desk->load_time) { efreet_desktop_free(desk); *changed = 1; @@ -299,12 +302,6 @@ main() eet_close(util_ef); eet_close(ef); - /* ahem - if u have no existing efreet cache - it simply deletes the new - * files it created and u never get anything. force changed to be 1 - quick - * fix. - */ - changed = 1; - /* unlink old cache files */ if (changed) {