forked from enlightenment/efl
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
This commit is contained in:
parent
d09a0965c5
commit
cfe7ae6528
|
@ -199,7 +199,11 @@ _ecore_file_monitor_inotify_events(Ecore_File_Monitor *em, char *file, int mask)
|
||||||
_ecore_file_monitor_inotify_print(buf, mask);
|
_ecore_file_monitor_inotify_print(buf, mask);
|
||||||
#endif
|
#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)
|
if (!isdir)
|
||||||
em->func(em->data, em, ECORE_FILE_EVENT_MODIFIED, buf);
|
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)
|
_ecore_file_monitor_inotify_monitor(Ecore_File_Monitor *em, const char *path)
|
||||||
{
|
{
|
||||||
int mask;
|
int mask;
|
||||||
mask = IN_MODIFY|
|
mask = IN_ATTRIB|IN_CLOSE_WRITE|
|
||||||
IN_MOVED_FROM|IN_MOVED_TO|
|
IN_MOVED_FROM|IN_MOVED_TO|
|
||||||
IN_DELETE|IN_CREATE|
|
IN_DELETE|IN_CREATE|
|
||||||
IN_DELETE_SELF|IN_MOVE_SELF|
|
IN_DELETE_SELF|IN_MOVE_SELF|
|
||||||
|
|
Loading…
Reference in New Issue