summaryrefslogtreecommitdiff
path: root/legacy/edje
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-05-09 07:30:59 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-05-09 07:30:59 +0000
commit8f61823f67c061a241d583cb8ccf5af164d936d4 (patch)
tree64745c2bea51788200c05cc7f23f031446e39372 /legacy/edje
parentcc3caf6172f63d081d8128924a76f6692929821f (diff)
edje: check that the file on disk didn't change when we try to reopen it.
SVN revision: 70883
Diffstat (limited to 'legacy/edje')
-rw-r--r--legacy/edje/ChangeLog2
-rw-r--r--legacy/edje/NEWS1
-rw-r--r--legacy/edje/src/lib/edje_load.c13
3 files changed, 14 insertions, 2 deletions
diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog
index aa22a7d70b..2fa15b5882 100644
--- a/legacy/edje/ChangeLog
+++ b/legacy/edje/ChangeLog
@@ -431,3 +431,5 @@
4312012-05-09 Cedric Bail 4312012-05-09 Cedric Bail
432 432
433 * Fix bug in case of nesting edje_object_signal_emit and edje_object_signal_callback_{add,del} 433 * Fix bug in case of nesting edje_object_signal_emit and edje_object_signal_callback_{add,del}
434 * Check that the file changed on disk when trying to reopen it.
435
diff --git a/legacy/edje/NEWS b/legacy/edje/NEWS
index c9bc3e97b7..2ca5c75546 100644
--- a/legacy/edje/NEWS
+++ b/legacy/edje/NEWS
@@ -12,6 +12,7 @@ Improvements:
12Fixes: 12Fixes:
13 * Add missing files in the tarballs. 13 * Add missing files in the tarballs.
14 * Prevent crash when running nested edje_object_signal_emit with edje_object_signal_callback_{add,del}. 14 * Prevent crash when running nested edje_object_signal_emit with edje_object_signal_callback_{add,del}.
15 * Do actually verify that the file on disk is different from the file we have loaded.
15 16
16Edje 1.2.0 17Edje 1.2.0
17 18
diff --git a/legacy/edje/src/lib/edje_load.c b/legacy/edje/src/lib/edje_load.c
index fc2aea3920..8cb823c8b3 100644
--- a/legacy/edje/src/lib/edje_load.c
+++ b/legacy/edje/src/lib/edje_load.c
@@ -290,8 +290,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
290 if (!file) file = ""; 290 if (!file) file = "";
291 if (!group) group = ""; 291 if (!group) group = "";
292 if (((ed->path) && (!strcmp(file, ed->path))) && 292 if (((ed->path) && (!strcmp(file, ed->path))) &&
293 (ed->group) && (!strcmp(group, ed->group))) 293 (ed->group) && (!strcmp(group, ed->group)) &&
294 return 1; 294 ed->file)
295 {
296 struct stat st;
297
298 if (stat(file, &st) != 0)
299 return 1;
300 if (st.st_mtime == ed->file->mtime)
301 return 1;
302 }
295 303
296 tev = evas_object_evas_get(obj); 304 tev = evas_object_evas_get(obj);
297 evas_event_freeze(tev); 305 evas_event_freeze(tev);
@@ -299,6 +307,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
299 307
300 if (_edje_script_only(ed)) _edje_script_only_shutdown(ed); 308 if (_edje_script_only(ed)) _edje_script_only_shutdown(ed);
301 if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed); 309 if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed);
310
302 _edje_file_del(ed); 311 _edje_file_del(ed);
303 312
304 eina_stringshare_replace(&ed->path, file); 313 eina_stringshare_replace(&ed->path, file);