summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorYeshwanth Reddivari <yashu21985@gmail.com>2018-02-14 11:53:51 -0800
committerCedric Bail <cedric@osg.samsung.com>2018-02-14 12:47:40 -0800
commit9c191d389045919c5a374ed511ba88a392722dcb (patch)
tree86f31af77aa3e6eeef17dbf728d8773b354bf31b /src/lib/ecore_file
parentcf2ce1c67575f9c80a546052a7e2133343444f43 (diff)
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 <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file_monitor_inotify.c2
1 files changed, 1 insertions, 1 deletions
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)
164 eina_hash_list_remove(monitor_hash, &ECORE_FILE_MONITOR_INOTIFY(em)->wd, em); 164 eina_hash_list_remove(monitor_hash, &ECORE_FILE_MONITOR_INOTIFY(em)->wd, em);
165 165
166 fd = ecore_main_fd_handler_fd_get(_fdh); 166 fd = ecore_main_fd_handler_fd_get(_fdh);
167 if (ECORE_FILE_MONITOR_INOTIFY(em)->wd) 167 if (ECORE_FILE_MONITOR_INOTIFY(em)->wd >= 0)
168 inotify_rm_watch(fd, ECORE_FILE_MONITOR_INOTIFY(em)->wd); 168 inotify_rm_watch(fd, ECORE_FILE_MONITOR_INOTIFY(em)->wd);
169 eina_stringshare_del(em->path); 169 eina_stringshare_del(em->path);
170 free(em); 170 free(em);