<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: Frameworks, Baloo, bruns.<br />Herald added projects: Frameworks, Baloo.<br />Herald added a subscriber: kde-frameworks-devel.<br />poboiko requested review of this revision.
</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/D21509">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If some folder was renamed while <tt style="background: #ebebeb; font-size: 13px;">baloo_file</tt> was not running, it should pop up in <tt style="background: #ebebeb; font-size: 13px;">UnIndexedFileIterator</tt>.<br />
However, it does not, because previously it was thought that folder should never be reindexed.<br />
It is not correct: it should be reindexed if its name was changed.<br />
As a consequence, we end up with invalid entries inside DB (DocumentUrl is invalid).</p>
<p>Also, added unit test for <tt style="background: #ebebeb; font-size: 13px;">UnIndexedFileIterator</tt>, which covers basic cases (including this one).<br />
Right now it fails due to <a href="https://phabricator.kde.org/D21427" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D21427: Always skip trailing slashes in FilderedDirIterator</a> (one of the folders has trailing slash, while it should not)</p>
<p>Also, since we need to check if name was changed already inside iterator, we can export this information<br />
and reuse it from <tt style="background: #ebebeb; font-size: 13px;">UnindexedFileIndexer</tt>.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Apply also patch from <a href="https://phabricator.kde.org/D21427" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D21427: Always skip trailing slashes in FilderedDirIterator</a>.</li>
<li class="remarkup-list-item">ctest</li>
</ol></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/D21509">https://phabricator.kde.org/D21509</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/unit/file/unindexedfileiteratortest.cpp<br />
src/file/unindexedfileindexer.cpp<br />
src/file/unindexedfileiterator.cpp<br />
src/file/unindexedfileiterator.h</div></div></div><br /><div><strong>To: </strong>poboiko, Frameworks, Baloo, bruns<br /><strong>Cc: </strong>kde-frameworks-devel, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>