Correctly encode URL of thumbnails
ClosedPublic

Authored by davidedmundson on Apr 11 2018, 11:27 PM.

Details

Summary

As per the amazingly detailed bug report, the spec says URLs should be
percent encoded. The main knock-on effect is we get a different hash
value for our preview file and we duplicate thumbnails if a user uses a
GNOME app.

BUG: 393015

Test Plan

Logged out and back in
Copied jpeg to a file with spaces
opened dolphin
Found relevant cache file in ~/.cache/thumbnails/normal based on timestamp
exiftool showed the correct URI.

Thumb URI : file:///tmp/with%20spaces.jpg

I assume the hash is now "correct" but I don't have a way to check

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 11 2018, 11:27 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
davidedmundson requested review of this revision.Apr 11 2018, 11:27 PM
ngraham accepted this revision.Apr 12 2018, 3:51 AM
ngraham added a subscriber: ngraham.

Confirmed the fix! It was indeed an amazing bug report.

This revision is now accepted and ready to land.Apr 12 2018, 3:51 AM
This revision was automatically updated to reflect the committed changes.