D21427: Always skip trailing slashes in FilderedDirIterator
Igor Poboiko
noreply at phabricator.kde.org
Fri Jun 28 13:22:01 BST 2019
poboiko added a comment.
Ping.
I've found a way to reproduce a related issue:
$ mkdir ~/test
$ balooctl config add includeFolders ~/test
$ balooctl stop
<make some changes with ~/test, i.e. add a tag>
$ balooctl start
This prints an error:
replace called with invalid arguments, docId: <docid> url: "~/test/"
The problem is the same: `DocumentUrlDB` returns a path without trailing slash, but `FilteredDirIterator` returns a path with one.
`WriteTransaction` thinks the path has changed, tries to replace it, calls `DocumentUrlDB::replace`, which fails because it doesn't want to work with path which has trailing slash.
In general, it's not a serious issue: we have problems only for folders that are inside `includeFolders`. If such folder wasn't renamed, then we don't care about DocUrlDB::replace failure anyway.
If it was renamed, most likely it's not inside `includeFolders` anymore. However, we can do something like
$ mkdir ~/test1
$ mkdir ~/test2
$ balooctl config add includeFolders ~/test{1,2}
$ touch ~/test1/somefile
$ balooctl stop
$ rm -rf ~/test2
$ mv ~/test2 ~/test1
$ balooctl start
the rename then gets silently ignored (file `somefile` doesn't pop up in searches; if we do `balooshow -x <docid>`, it returns an invalid path).
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D21427
To: poboiko, #frameworks, #baloo, bruns
Cc: kde-frameworks-devel, LeGast00n, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190628/56819190/attachment.html>
More information about the Kde-frameworks-devel
mailing list