inotify: send paired events to both sides
Submitted by Allison (desrt)
A file monitor on a directory could be prevented from seeing incoming moves of files simply because of the existence of another unrelated file monitor in the same process watching the source directory of the move.
This happens even if the affected monitor does not use the SEND_MOVED flag (although the 'unrelated' one must be using it).
This works correctly, and reports both CREATED and DELETED events:
def show_event(mon, child, other, event): print event m0 = Gio.File.new_for_path('/a').monitor_directory (0, None) m0.connect('changed', show_event)
but if this is also added:
m1 = Gio.File.new_for_path('/b').monitor_directory (Gio.FileMonitorFlags.SEND_MOVED, None)
then m0 will fail to report CREATED events for moves from /b to /a.
Let's fix that to avoid the 'spooky action at a distance' effect.