Improve error handling while decoding image files for viewing
@hadess
Submitted by Bastien Nocera Link to original bug (#780731)
Description
gnome-photos-3.24.0-1.fc26.x86_64
We saw this after adding git-lfs support to https://github.com/hadess/gnome-demo-content The machine didn't have git-lfs installed, so we got text files in place of photos, in the Pictures directory
Clicking on an unsupported photo simply exits with retval 1, not crash, no error message, simply exits.
$ cat foo.jpg version https://git-lfs.github.com/spec/v1 oid sha256:9b1db5ff43b50d91a297da35bd816bf62f45d8a818bce44d1b76be367603c045 size 510986 $ tracker index --file foo.jpg $ gnome-photos
** (gnome-photos:8891): WARNING **: Unable to create thumbnail: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._gdk_2dpixbuf_2derror_2dquark.Code3: Impossible de reconnaître le format d'image du fichier « /home/gnome/Images/foo.jpg » Not a JPEG file: starts with 0x76 0x65 $ echo $? 1