fix ecore-file inotify monitoring on soon-to-be deleted files
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 12 Jun 2012 07:40:37 +0000 (07:40 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 12 Jun 2012 07:40:37 +0000 (07:40 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@71985 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/ecore_file/ecore_file_monitor_inotify.c

index 01d7ee6..d3706d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
         * ibus-immodule: Add immodule for supporting ibus.
 
+2012-06-12  Mike Blumenkrantz
+
+        * Fixed bug in ecore-file monitoring with inotify where watching a file
+          that was deleted broke the world.
index efdd8c2..30226d3 100644 (file)
@@ -274,7 +274,7 @@ _ecore_file_monitor_inotify_events(Ecore_File_Monitor *em, char *file, int mask)
          * else delete it */
         if (ecore_file_exists(em->path))
           {
-             if (!_ecore_file_monitor_inotify_monitor(em, em->path))
+             if (_ecore_file_monitor_inotify_monitor(em, em->path))
                em->func(em->data, em, ECORE_FILE_EVENT_DELETED_SELF, em->path);
           }
         else
@@ -301,7 +301,7 @@ _ecore_file_monitor_inotify_monitor(Ecore_File_Monitor *em, const char *path)
       inotify_add_watch(ecore_main_fd_handler_fd_get(_fdh), path, mask);
    if (ECORE_FILE_MONITOR_INOTIFY(em)->wd < 0)
      {
-        ERR("inotify_add_watch error");
+        INF("inotify_add_watch failed, file was deleted");
         ecore_file_monitor_inotify_del(em);
         return 0;
      }