<table><tr><td style="">ngraham created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7948" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>BUG: 364884</p>
<p>Only match real MIME types when doing string matching to prevent pulling in unrelated files whose types match the string.</p>
<p>This prevents weird situations such as ISO files (which show up as "raw CD image") appearing in image searches.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Confirmed at www.mime-type.net/ that all audio, video, and image MIME types have the key word before the slash (e.g. "image/")</li>
<li class="remarkup-list-item">Booted a clean KDE Neon VM and added an ISO and a bunch of pictures of various types</li>
<li class="remarkup-list-item">Confirmed the problem: <tt style="background: #ebebeb; font-size: 13px;">baloosearch -t image iso</tt> shows ISO files</li>
<li class="remarkup-list-item">Patched and rebuilt Baloo</li>
<li class="remarkup-list-item">Forced a re-index operation (balooctl disable; rm ~/.local/share/baloo/index*; balooctl enable)</li>
<li class="remarkup-list-item">Did a new image search (<tt style="background: #ebebeb; font-size: 13px;">baloosearch -t image iso</tt>) and confirmed that the ISO does not show up</li>
<li class="remarkup-list-item">Confirmed that other images still show up</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7948" rel="noreferrer">https://phabricator.kde.org/D7948</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/file/basicindexingjob.cpp</div></div></div><br /><div><strong>To: </strong>ngraham<br /><strong>Cc: </strong>Frameworks<br /></div>