When gwenview fails to create a thumbnail, it reuses the last displayed thumbnail. Reproducible: Always Steps to Reproduce: 1. Create a directory, put in it an image called a.jpg 2. Create an empty file called b.jpg (for instance: touch b.jpg ) 3. Launch gwenview on the directory Actual Results: gwenview tries to create a thumbnail for b.jpg, but it is impossible as it is not a jpg file. However, gwenview does display a thumbnail for b.jpg: it reuses the one created for a.jpg. Then, the user sees twice the same picture with different names, which is confusing. The user might delete a.jpg believing there is a copy in b.jpg! Expected Results: b.jpg should not be displayed by gwenview, or should be displayed without thumbnail, or with a "there was an error" thumbnail. I have seen this bug after upgrading from fedora 21 to fedora 23, on a directory containing both .jpg and .tiff files. gwenview was unable to make thumbnails for the .tiff files because package qt5-qtimageformats was not installed (that was not obvious and took me some time to find out!) and so, silently, it reused for each tiff the latest successfully generated thumbnail (for a .jpg file). There was a moment of panic: were some files overwritten ? I leave the severity as normal, although it could arguably be marked as critical, because this bug might induce the user to remove some files, believing there is a copy, and thus lose some data.
Agreed. Hopefully this is an easy fix.
Git commit f5b3f0d91c044aa2ba7bf521ccbad062cbcbcd4d by Nate Graham, on behalf of Tom Moebert. Committed on 24/05/2019 at 15:43. Pushed by ngraham into branch 'master'. Do not re-use previously generated thumbnails in case of error Summary: If thumbnail generation had failed for a certain image, the thumbnail from the previous successful run would have been mistakenly used. Reviewers: #gwenview, ngraham Reviewed By: #gwenview, ngraham Subscribers: ngraham, #gwenview Tags: #gwenview Differential Revision: https://phabricator.kde.org/D21337 M +2 -0 lib/thumbnailprovider/thumbnailgenerator.cpp https://commits.kde.org/gwenview/f5b3f0d91c044aa2ba7bf521ccbad062cbcbcd4d