cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9c191d389045919c5a374ed511ba88a392722dcb

commit 9c191d389045919c5a374ed511ba88a392722dcb
Author: Yeshwanth Reddivari <yashu21...@gmail.com>
Date:   Wed Feb 14 11:53:51 2018 -0800

    ecore_file: modify check for wd in file monitor del
    
    Summary:
    Make checks consistent in ecore_file_monitor_backend_del.
    inotify_add_watch can return 0 as well on success.
    So, even if wd is 0, inotify_rm_watch need to be invoked.
    
    Reviewers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D5770
    
    Signed-off-by: Cedric Bail <ced...@osg.samsung.com>
---
 src/lib/ecore_file/ecore_file_monitor_inotify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c 
b/src/lib/ecore_file/ecore_file_monitor_inotify.c
index e4bb6d3b0b..d13eb2719d 100644
--- a/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -164,7 +164,7 @@ ecore_file_monitor_backend_del(Ecore_File_Monitor *em)
      eina_hash_list_remove(monitor_hash, &ECORE_FILE_MONITOR_INOTIFY(em)->wd, 
em);
 
    fd = ecore_main_fd_handler_fd_get(_fdh);
-   if (ECORE_FILE_MONITOR_INOTIFY(em)->wd)
+   if (ECORE_FILE_MONITOR_INOTIFY(em)->wd >= 0)
      inotify_rm_watch(fd, ECORE_FILE_MONITOR_INOTIFY(em)->wd);
    eina_stringshare_del(em->path);
    free(em);

-- 


Reply via email to