<table><tr><td style="">poboiko retitled this revision from "[baloo_file] Index renamed folders inside UnindexedFileIndexer" to "[UnIndexedFileIteratorTest] Add tests".<br />poboiko edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-uy4gos55arlmfne/">(Show Details)</a>
</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>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">If some folder was renamed while `baloo_file` was not running, it should pop up in `UnIndexedFileIterator`.<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).<br />
<br />
Also, added unit test for `UnIndexedFileIterator`, which covers basic cases (including this one).<br />
Right now it fails due to {D21427} (one of the folders has trailing slash</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Add tests for UnIndexedFileIterator</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">while it should not)</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">which cover basic cases.</span><br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Also</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Right now it fails</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">since we need to check if name was changed already inside iterator</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">see {D21427} (one of the folders has trailing slash</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">we can export this information<br />
and reus</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">whil</span>e it <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">from `UnindexedFileIndexer`.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">should not)</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</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>To: </strong>poboiko, Frameworks, Baloo, bruns<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>