GNOME Bugzilla – Bug 790191
Avoid Encapsulated PostScript (EPS) files
Last modified: 2017-12-31 17:19:06 UTC
<rishi> Yeah, EPSes are a problem. Tracker considers those as images, but to open them you need evince. :/ <rishi> Need to do something there. Maybe blacklist them? <rishi> Like GIFs.
Created attachment 363375 [details] [review] search-type-manager: Avoid .eps files
Do you have a sample EPS file that you could attach here?
Created attachment 365268 [details] Sample .eps file Sample .eps file which is currently sitting on my disk. While running gnome-photos I get: (gnome-photos:9706): gnome-photos-WARNING **: 00:25:17.278: Unable to create thumbnail: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._gdk_2dpixbuf_2derror_2dquark.Code3: Couldn’t recognize the image file format for file “/home/uajain/Downloads/gnome-fosdem-2017-measured.eps”
Review of attachment 363375 [details] [review]: Thanks for fixing this. It looks correct to me. ::: src/photos-search-type-manager.c @@ +97,3 @@ + blacklist = g_strdup ("nie:mimeType(?urn) != 'image/x-eps' && nie:mimeType(?urn) != 'image/gif'"); + + item_filter = g_strdup_printf ("(fn:contains (?type, 'nmm#Photo') && %s)", blacklist); We could even turn this into an array of blacklisted MIME types, to minimize future code changes when we add or remove a type.
Created attachment 366125 [details] [review] search-type-manager: Avoid Encapsulated PostScript (EPS) files Turned it into an array and pushed to master.