Diffusion Baloo 5e1add922ab2

[baloo/KInotify] Notify if folder was moved from unwatched place

Authored by poboiko on Feb 3 2019, 3:34 PM.

Description

[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

Details

Committed
poboikoFeb 15 2019, 3:41 PM
Reviewer
Baloo
Differential Revision
D18698: [baloo/KInotify] Notify if folder was moved from unwatched place
Parents
R293:6b58be56b380: Simplify term debug output
Branches
Unknown
Tags
Unknown