inotify notification backend doesn't detect early created files in new subdir
Submitted by Alexander Larsson
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.