D7948: Only match real MIME types, not e.g. "raw CD image"
Nathaniel Graham
noreply at phabricator.kde.org
Sat Sep 23 04:38:08 UTC 2017
ngraham created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
BUG: 364884
Only match real MIME types when doing string matching to prevent pulling in unrelated files whose types match the string.
This prevents weird situations such as ISO files (which show up as "raw CD image") appearing in image searches.
TEST PLAN
- Confirmed at www.mime-type.net/ that all audio, video, and image MIME types have the key word before the slash (e.g. "image/")
- Booted a clean KDE Neon VM and added an ISO and a bunch of pictures of various types
- Confirmed the problem: `baloosearch -t image iso` shows ISO files
- Patched and rebuilt Baloo
- Forced a re-index operation (balooctl disable; rm ~/.local/share/baloo/index*; balooctl enable)
- Did a new image search (`baloosearch -t image iso`) and confirmed that the ISO does not show up
- Confirmed that other images still show up
REPOSITORY
R293 Baloo
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D7948
AFFECTED FILES
src/file/basicindexingjob.cpp
To: ngraham
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170923/809455e8/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list