After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661162 - inotify notification backend doesn't detect early created files in new subdir
inotify notification backend doesn't detect early created files in new subdir
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-10-07 09:01 UTC by Alexander Larsson
Modified: 2018-05-24 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Larsson 2011-10-07 09:01:28 UTC
If you do
rm -rf /tmp/noexist/
gvfs-monitor-dir  /tmp/noexist

and then in another shell:
mkdir /tmp/noexist; mkdir /tmp/noexist/subdir

Then the monitor will only detect the creation of the noexist dir.

However if you instead do:
mkdir /tmp/noexist; sleep 10; mkdir /tmp/noexist/subdir

Then it will also detect the creation of subdir. 

This is a race in the handling of non-existing directories. If we suddenly detect that the directory exists, then we need to readdir it after we have created an inotify monitor for it, since things could have been added to it before we created the monitor.
Comment 1 GNOME Infrastructure Team 2018-05-24 13:26:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/461.