eio: make poll backend pass eio_test_monitor.c test suite.
authorCedric BAIL <cedric@osg.samsung.com>
Sun, 4 Oct 2015 08:43:54 +0000 (10:43 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Sun, 4 Oct 2015 14:22:49 +0000 (16:22 +0200)
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 <cedric@osg.samsung.com>
src/lib/eio/eio_monitor_poll.c

index 6b7b5a8..fc4b70e 100644 (file)
@@ -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();