From: Cedric BAIL Date: Sun, 4 Oct 2015 08:43:54 +0000 (+0200) Subject: eio: make poll backend pass eio_test_monitor.c test suite. X-Git-Tag: v1.16.0-alpha1~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4c588b1e40c8a68348d14a2c82f601847bdbb5c;p=platform%2Fupstream%2Fefl.git eio: make poll backend pass eio_test_monitor.c test suite. Summary: The current poll backend code uses only filename when reporting changes, while eio tests (and presumably other backends) use absolute path. This makes poll backends behavior more consistent with other backends. Test Plan: Ran eio test suite with poll backend. Reviewers: cedric Reviewed By: cedric Subscribers: cedric Projects: #efl Differential Revision: https://phab.enlightenment.org/D3083 Signed-off-by: Cedric BAIL --- diff --git a/src/lib/eio/eio_monitor_poll.c b/src/lib/eio/eio_monitor_poll.c index 6b7b5a8..fc4b70e 100644 --- a/src/lib/eio/eio_monitor_poll.c +++ b/src/lib/eio/eio_monitor_poll.c @@ -148,29 +148,29 @@ _eio_monitor_fallback_heavy_cb(void *data, Ecore_Thread *thread) if (!backend->initialised) { - eina_hash_add(backend->children, info->path + info->name_start, cmp); + eina_hash_add(backend->children, info->path, cmp); } else { - cmp = eina_hash_find(backend->children, info->path + info->name_start); + cmp = eina_hash_find(backend->children, info->path); if (!cmp) { /* New file or new directory added */ ecore_thread_main_loop_begin(); - _eio_monitor_send(backend->parent, info->path + info->name_start, + _eio_monitor_send(backend->parent, info->path, info->type != EINA_FILE_DIR ? EIO_MONITOR_FILE_CREATED : EIO_MONITOR_DIRECTORY_CREATED); ecore_thread_main_loop_end(); cmp = malloc(sizeof (Eio_Monitor_Stat)); memcpy(cmp, &buffer, sizeof (Eina_Stat)); - eina_hash_add(backend->children, info->path + info->name_start, cmp); + eina_hash_add(backend->children, info->path, cmp); } else if (memcmp(cmp, &buffer, sizeof (Eina_Stat)) != 0) { /* file has been modified */ ecore_thread_main_loop_begin(); - _eio_monitor_send(backend->parent, info->path + info->name_start, + _eio_monitor_send(backend->parent, info->path, info->type != EINA_FILE_DIR ? EIO_MONITOR_FILE_MODIFIED : EIO_MONITOR_DIRECTORY_MODIFIED); ecore_thread_main_loop_end();