~blue-shell/blue-shell/baloo

Viewing all changes in revision 1455.

  • Committer: Stefan Brüns
  • Date: 2019-02-11 22:53:41 UTC
  • Revision ID: git-v1:97aa68252c4a4a3e956956c381353dc1180e031f
Handle folders matching substrings of included/excluded folders correctly

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

Reviewers: #baloo, #frameworks, poboiko, ngraham

Reviewed By: #baloo, ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks, #baloo

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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: