D20299: [indexcleaner] Avoid removing included folders below excluded ones
Stefan Brüns
noreply at phabricator.kde.org
Sat Apr 6 11:40:13 BST 2019
bruns created this revision.
bruns added reviewers: Baloo, Frameworks, ngraham, astippich, poboiko.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.
REVISION SUMMARY
This fixes a regression introduced with commit e58804bf9eb8 <https://phabricator.kde.org/R293:e58804bf9eb8d507d3ef4aa8faf12d6854f5a8bc>
("React to config updates inside indexer").
The recursion should stop when it reaches an explicitly included folder,
thus pass shouldDelete also into the iteration for excluded folders.
The current unconditional removal causes recurrent indexing of included
subtrees on each login.
Do a depth first walk, and after returning check if there are any
children left. Only delete the folder if it is empty. Otherwise, the
directory tree structure has dangling subtrees.
TEST PLAN
configure an includeFolder below an excludeFolder
start balooctl monitor
restart baloo_file
files below the includeFolder should not be needed to be reindexed
REPOSITORY
R293 Baloo
BRANCH
indexcleaner
REVISION DETAIL
https://phabricator.kde.org/D20299
AFFECTED FILES
src/engine/writetransaction.h
src/file/indexcleaner.cpp
To: bruns, #baloo, #frameworks, ngraham, astippich, poboiko
Cc: kde-frameworks-devel, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190406/fa24226f/attachment.html>
More information about the Kde-frameworks-devel
mailing list