~blue-shell/blue-shell/baloo

Viewing all changes in revision 1457.

  • Committer: Igor Poboiko
  • Date: 2019-02-15 15:41:27 UTC
  • Revision ID: git-v1:5e1add922ab2a1d6b4a2131b846c5a9d964c43a2
[baloo/KInotify] Notify if folder was moved from unwatched place

Summary:
If a folder was moved from an unwatched place, `KInotify` will receive an `EventMoveTo` event,
which doesn't have an `EventMoveFrom` counterpart, and thus it will emit only `created` signal
for the moved directory, but not its contents.
It also won't install watches for the directory (as it does in `EventCreate`).

Instead use FilteredDirIterator to emit created() signal for all the contents as well, and add inotify watches.

It should also now handle the race condition if a directory was created
and files were moved inside it before an inotify watch for this directory was installed.

Note that it's not really realted to symbolic links, one just has to move a folder from excluded place to included.

BUG: 342224

Test Plan:
Added a test case for `KInotifyTest`, similar to one described in Bug 342224.
It passes now.

Reviewers: #baloo, #frameworks, ngraham, bruns

Reviewed By: #baloo, ngraham, bruns

Subscribers: bruns, ngraham, kde-frameworks-devel, #baloo

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D18698

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: