[NewFileIndexer] Use correct mimetype for folders, check excludeFolders
ClosedPublic

Authored by bruns on Jun 9 2019, 10:55 PM.

Details

Summary

mimeTypeForFile yields the wrong type for folders, hardcode it.

In case a newly added folder is an excluded folder, avoid adding it to
the index.

Test Plan

$> balooctl config add ~/test/excluded
$> mkdir ~/test
$> mkdir ~/test/excluded; mkdir ~/test/included.log/
$> balooshow -x ~/test/*

'excluded' should not be in the index, 'included.log' should have
mimetype inode/directory (terms 'Minode Mdirectory').

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Jun 9 2019, 10:55 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptJun 9 2019, 10:55 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Jun 9 2019, 10:55 PM
poboiko accepted this revision.Jun 10 2019, 9:41 AM

Can we also cover this case with tests?

This revision is now accepted and ready to land.Jun 10 2019, 9:41 AM
This revision was automatically updated to reflect the committed changes.