Fixes a crash in Peruse triggered by baloo
ClosedPublic

Authored by tcanabrava on Aug 16 2019, 12:38 PM.

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tcanabrava created this revision.Aug 16 2019, 12:38 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptAug 16 2019, 12:38 PM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
tcanabrava requested review of this revision.Aug 16 2019, 12:38 PM
ngraham accepted this revision.Aug 16 2019, 12:44 PM
ngraham added a subscriber: ngraham.

Makes sense; this shouldn't assert.

This revision is now accepted and ready to land.Aug 16 2019, 12:44 PM
bruns requested changes to this revision.Aug 16 2019, 2:20 PM

Please just return without message, and also change the one below.

Searchstore is used by krunner (via baloorunner), and it searches as you type, so a term could be invalid for a short moment.

This revision now requires changes to proceed.Aug 16 2019, 2:20 PM
tcanabrava updated this revision to Diff 63863.Aug 16 2019, 2:54 PM
  • Remove debug line
  • return null instead of asserting
bruns accepted this revision.Aug 16 2019, 4:00 PM
This revision is now accepted and ready to land.Aug 16 2019, 4:00 PM

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.

This revision was automatically updated to reflect the committed changes.