D21509: [baloo_file] Index renamed folders inside UnindexedFileIndexer
Igor Poboiko
noreply at phabricator.kde.org
Fri May 31 10:02:40 BST 2019
poboiko created this revision.
poboiko added reviewers: Frameworks, Baloo, bruns.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
poboiko requested review of this revision.
REVISION SUMMARY
If some folder was renamed while `baloo_file` was not running, it should pop up in `UnIndexedFileIterator`.
However, it does not, because previously it was thought that folder should never be reindexed.
It is not correct: it should be reindexed if its name was changed.
As a consequence, we end up with invalid entries inside DB (DocumentUrl is invalid).
Also, added unit test for `UnIndexedFileIterator`, which covers basic cases (including this one).
Right now it fails due to D21427: Always skip trailing slashes in FilderedDirIterator <https://phabricator.kde.org/D21427> (one of the folders has trailing slash, while it should not)
Also, since we need to check if name was changed already inside iterator, we can export this information
and reuse it from `UnindexedFileIndexer`.
TEST PLAN
1. Apply also patch from D21427: Always skip trailing slashes in FilderedDirIterator <https://phabricator.kde.org/D21427>.
2. ctest
REPOSITORY
R293 Baloo
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D21509
AFFECTED FILES
autotests/unit/file/unindexedfileiteratortest.cpp
src/file/unindexedfileindexer.cpp
src/file/unindexedfileiterator.cpp
src/file/unindexedfileiterator.h
To: poboiko, #frameworks, #baloo, bruns
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/20190531/d38a58d0/attachment.html>
More information about the Kde-frameworks-devel
mailing list