From cfe7ae6528257f60248d81d27b31a8043474ecb7 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Wed, 24 Nov 2010 21:15:52 +0000 Subject: [PATCH] listen for IN_ATTRIB and IN_CLOSE_WRITE use IN_ATTRIB|IN_CLOSE_WRITE instead of IN_MODIFY. Now we get changes if attributes change, and only event when a user closes a changed file. IN_MODIFY will trigger an event each time a write is flush'ed. SVN revision: 54961 --- .../ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c index 5169a0e6ce..86a1fbbe82 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c @@ -199,7 +199,11 @@ _ecore_file_monitor_inotify_events(Ecore_File_Monitor *em, char *file, int mask) _ecore_file_monitor_inotify_print(buf, mask); #endif - if (mask & IN_MODIFY) + if (mask & IN_ATTRIB) + { + em->func(em->data, em, ECORE_FILE_EVENT_MODIFIED, buf); + } + if (mask & IN_CLOSE_WRITE) { if (!isdir) em->func(em->data, em, ECORE_FILE_EVENT_MODIFIED, buf); @@ -264,7 +268,7 @@ static int _ecore_file_monitor_inotify_monitor(Ecore_File_Monitor *em, const char *path) { int mask; - mask = IN_MODIFY| + mask = IN_ATTRIB|IN_CLOSE_WRITE| IN_MOVED_FROM|IN_MOVED_TO| IN_DELETE|IN_CREATE| IN_DELETE_SELF|IN_MOVE_SELF|