runners/bookmarks: Various fixes
Original commit message(s)
- runners/bookmarks: Set minimum letter count to 2
Bookmarks runner is relatively expensive, searchin for "h" matches literally everything because of https://. Require at least 2 characters, this way "Qt" still works.
- runners/bookmarks: Recreate cache dir if it was removed before
For some reason it cleans up the entire cache dir on teardown (so after every single query session...), when it then tries to fetch some more favicons it fails to write them because the folder doesn't exist.
- runners/bookmarks: Load favicon only when match actually matches
Loading the icons is quite expensive.
Reason for the change
I noticed my log getting spammed with a million “could not open for writing” messages, dug deeper and found various issues.
Not sure why it throws away the cache (for all my bookmarks this is 2 MiB) after every query session, though. I would have assumed the point of a cache is to cache things for longer.
Test plan
I searched for “qt” multiple times, got my results still but also got favicons after the first query.
CC @alex