poboiko added a comment.
AFAIK `canonicalFilePath()` cannot return path without slash. The result is either empty (if path does not exist; this is covered by first `if`), or a proper path. The second check is redundant. REPOSITORY R293 Baloo BRANCH fixCrashWithEmptyFolder REVISION DETAIL https://phabricator.kde.org/D23200 To: tcanabrava, #baloo, astippich, bruns, poboiko, ngraham Cc: ngraham, kde-frameworks-devel, #baloo, LeGast00n, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, bruns, abrahams