glib/gio/inotify
Cosimo Alfarano fd1e9938b3 Send CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted
This patch makes GFileMonitor to emit EVENT_CHANGES_DONE_HINT when
EVENT_CREATED is emitted but the file is not opened for writing.

On file moves across different mounted volumes, inotify will always emit
IN_CREATE and IN_CLOSE_WRITE (plus other events).
This translates into GIO's _EVENT_CREATED and _EVENT_CHANGES_DONE_HINT.

On file moves across the same mounted volumes, inotify will emit
IN_MOVED_FROM/IN_MOVED_TO which will be translated into
_EVENT_DELETED/_EVENT_CREATED GIO's side. No _EVENT_CHANGES_DONE_HINT is
emited afterwards.
Under such circumstances a file indexer does not know when actually the
file is ready to be indexed, either waiting too much or triggering the
indexing twice. On small devices it's not advisable.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=640077
Bug-NB: NB#219982
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Tomas Bzatek <tbzatek@redhat.com>
2011-12-05 18:27:34 +00:00
..
ginotifydirectorymonitor.c Clean up improper #includes 2010-08-06 13:05:18 -04:00
ginotifydirectorymonitor.h Clean up improper #includes 2010-08-06 13:05:18 -04:00
ginotifyfilemonitor.c gio/: fully remove gioalias hacks 2010-07-07 19:53:22 -04:00
ginotifyfilemonitor.h
inotify-diag.c
inotify-diag.h
inotify-helper.c Send CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted 2011-12-05 18:27:34 +00:00
inotify-helper.h
inotify-kernel.c Send CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted 2011-12-05 18:27:34 +00:00
inotify-kernel.h Send CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted 2011-12-05 18:27:34 +00:00
inotify-missing.c
inotify-missing.h
inotify-path.c Move event support in the inotify backend 2010-02-18 15:50:26 +01:00
inotify-path.h Move event support in the inotify backend 2010-02-18 15:50:26 +01:00
inotify-sub.c Move event support in the inotify backend 2010-02-18 15:50:26 +01:00
inotify-sub.h Move event support in the inotify backend 2010-02-18 15:50:26 +01:00
Makefile.am Replace -I with $(glib_INCLUDES) and friends 2010-08-06 13:10:34 -04:00