new subscriptions can report old events from an existing directory watch
Submitted by Peter Clifton
I've been having some issues with file-change monitoring, where I hook up a GFileMonitor to a file just after having changed it on disk. This only occurs in the case where a second monitor exists on the directory in question. (In this case, left hanging around due to a possible bug in the GTK file-chooser).
It appears that the GIO backend code has a bit of a race, in that it can queue up events for a directory - then process them at some later time (after my new subscription is added).
The OLD events match against the new subscription, and are dispatched - despite the events predating the subscription.
Should adding a new subscription force processing of any events up to that point (before adding the new subscription), or would this be something that could be handled by looking at the timestamp on the events?