Do not re-use previously generated thumbnails in case of error
ClosedPublic

Authored by tommo on May 22 2019, 11:43 AM.

Details

Summary

If thumbnail generation had failed for a certain image, the thumbnail from the previous successful run would have been mistakenly used.

BUG: 355590

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
tommo requested review of this revision.May 22 2019, 11:43 AM
tommo created this revision.
tommo edited the summary of this revision. (Show Details)May 22 2019, 11:52 AM

Thanks, this makes sense. Is there an easy way to force thumbnail generation to fail for an image to test this?

tommo added a comment.May 22 2019, 4:29 PM

I just followed the steps to repeat described in the bug, i.e. create an empty file: touch test.jpg

ngraham requested changes to this revision.May 22 2019, 5:16 PM

Perfect, thanks. Works fine and seems like an appropriate solution. Please fix a typo in the comment and then this is good to go!

lib/thumbnailprovider/thumbnailgenerator.cpp
274

successul -> successful

This revision now requires changes to proceed.May 22 2019, 5:16 PM
tommo updated this revision to Diff 58528.May 23 2019, 4:53 AM
ngraham accepted this revision.May 24 2019, 4:52 AM
This revision is now accepted and ready to land.May 24 2019, 4:52 AM
This revision was automatically updated to reflect the committed changes.