<table><tr><td style="">poboiko added a comment.
</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/D21427">View Revision</a></tr></table><br /><div><div><p>Ping.</p>

<p>I've found a way to reproduce a related issue:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="console" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">$ mkdir ~/test</span>
<span style="color: #000080">$ balooctl config add includeFolders ~/test</span>
<span style="color: #000080">$ balooctl stop</span>
<span style="color: #808080"><make some changes with ~/test, i.e. add a tag></span>
<span style="color: #000080">$ balooctl start</span></pre></div>

<p>This prints an error:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">replace called with invalid arguments, docId: <docid> url: "~/test/"</pre></div>

<p>The problem is the same: <tt style="background: #ebebeb; font-size: 13px;">DocumentUrlDB</tt> returns a path without trailing slash, but <tt style="background: #ebebeb; font-size: 13px;">FilteredDirIterator</tt> returns a path with one.<br />
<tt style="background: #ebebeb; font-size: 13px;">WriteTransaction</tt> thinks the path has changed, tries to replace it, calls <tt style="background: #ebebeb; font-size: 13px;">DocumentUrlDB::replace</tt>, which fails because it doesn't want to work with path which has trailing slash.</p>

<p>In general, it's not a serious issue: we have problems only for folders that are inside <tt style="background: #ebebeb; font-size: 13px;">includeFolders</tt>. If such folder wasn't renamed, then we don't care about DocUrlDB::replace failure anyway.<br />
If it was renamed, most likely it's not inside <tt style="background: #ebebeb; font-size: 13px;">includeFolders</tt> anymore. However, we can do something like</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="console" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">$ mkdir ~/test1</span>
<span style="color: #000080">$ mkdir ~/test2</span>
<span style="color: #000080">$ balooctl config add includeFolders ~/test{1,2}</span>
<span style="color: #000080">$ touch ~/test1/somefile</span>
<span style="color: #000080">$ balooctl stop</span>
<span style="color: #000080">$ rm -rf ~/test2</span>
<span style="color: #000080">$ mv ~/test2 ~/test1</span>
<span style="color: #000080">$ balooctl start</span></pre></div>

<p>the rename then gets silently ignored (file <tt style="background: #ebebeb; font-size: 13px;">somefile</tt> doesn't pop up in searches; if we do <tt style="background: #ebebeb; font-size: 13px;">balooshow -x <docid></tt>, it returns an invalid path).</p></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/D21427">https://phabricator.kde.org/D21427</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>