D18830: Handle folders matching substrings of included/excluded folders correctly
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Thu Feb 7 20:18:54 GMT 2019
bruns created this revision.
bruns added reviewers: Baloo, Frameworks, poboiko, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.
REVISION SUMMARY
FileIndexerConfig::shouldFolderBeIndexe(...) calls folderInList to
determine if the config should be included or excluded.
For a config:
[0] include: <HOME>/foo
[1] exclude: <HOME>/foo/bar
the folder "<HOME>/foo/barbaz" would be erroneously excluded, as
folders[1].startsWith(folder) is true, i.e. the exclude entry would be
used, although folders[0] is the correct match (folders are matched back
to front).
This can be avoided by normalizing the config entries to always end
with a trailing slash.
For the config itself this had been handled explicitly, but is no longer
needed.
Depends on D18829 <https://phabricator.kde.org/D18829>
REPOSITORY
R293 Baloo
BRANCH
submit
REVISION DETAIL
https://phabricator.kde.org/D18830
AFFECTED FILES
src/file/fileindexerconfig.cpp
src/tools/balooctl/configcommand.cpp
To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190207/88cc400e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list