Make sure only directories are added to the inotify watcher
Summary:
Although watchFolder is only called for directories, there is a small
time frame where the just added directory has been deleted and a file
with the same path has been created. This race condition can be avoided
by adding the KInotify::FlagOnlyDir filter flag.
This has been documented also in e.g. https://lwn.net/Articles/605128/.
Reviewers: Baloo, Frameworks, poboiko, ngraham
Reviewed By: Baloo, ngraham
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D18776