summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-06-12 07:44:27 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-06-12 07:44:27 +0000
commit000cd9b9ae67aa5d534bc7dd6daf822d81ead972 (patch)
treede5e13ee67f098c3d46a435a7492ebbc11b2796b
parent7403d34721247d7417abac3e18b315480380fd1e (diff)
backport previous commitecore-1.0
SVN revision: 71986
-rw-r--r--ChangeLog5
-rw-r--r--src/lib/ecore_file/ecore_file_monitor_inotify.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ef9d6251..1458e713 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -100,3 +100,8 @@
1002012-06-06 Mike Blumenkrantz 1002012-06-06 Mike Blumenkrantz
101 101
102 * 1.0.2 release 102 * 1.0.2 release
103
1042012-06-12 Mike Blumenkrantz
105
106 * Fixed bug in ecore-file monitoring with inotify where watching a file
107 that was deleted broke the world.
diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c
index 135bc5ce..2dc2b88b 100644
--- a/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -262,7 +262,7 @@ _ecore_file_monitor_inotify_events(Ecore_File_Monitor *em, char *file, int mask)
262 * else delete it */ 262 * else delete it */
263 if (ecore_file_exists(em->path)) 263 if (ecore_file_exists(em->path))
264 { 264 {
265 if (!_ecore_file_monitor_inotify_monitor(em, em->path)) 265 if (_ecore_file_monitor_inotify_monitor(em, em->path))
266 em->func(em->data, em, ECORE_FILE_EVENT_DELETED_SELF, em->path); 266 em->func(em->data, em, ECORE_FILE_EVENT_DELETED_SELF, em->path);
267 } 267 }
268 else 268 else
@@ -289,7 +289,7 @@ _ecore_file_monitor_inotify_monitor(Ecore_File_Monitor *em, const char *path)
289 inotify_add_watch(ecore_main_fd_handler_fd_get(_fdh), path, mask); 289 inotify_add_watch(ecore_main_fd_handler_fd_get(_fdh), path, mask);
290 if (ECORE_FILE_MONITOR_INOTIFY(em)->wd < 0) 290 if (ECORE_FILE_MONITOR_INOTIFY(em)->wd < 0)
291 { 291 {
292 ERR("inotify_add_watch error"); 292 INF("inotify_add_watch failed, file was deleted");
293 ecore_file_monitor_inotify_del(em); 293 ecore_file_monitor_inotify_del(em);
294 return 0; 294 return 0;
295 } 295 }