GNOME Bugzilla – Bug 760151
Should fall back to built-in format sniffing if gio sniffing fails
Last modified: 2016-01-15 13:00:37 UTC
Created attachment 318248 [details] [review] Proposed patch If for whatever reason g_content_type_guess() fails to detect the file type, gdk-pixbuf should retry with its builtin file type detection instead of giving up and failing to load a file. This is implemented in the proposed patch. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790423 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801170 for what this wants to fix. The problem in the above cases is that the mime type database in /usr/share/mime/mime.cache is not available which makes all image loading fail.
According to #gtk+, this code should be removed rather than its use extended: <mclasen> if you ask me, 'the mime database is not available' is a case of broken installation <mclasen> not something to work around with fallbacks <psychon> Then why does gdk-pixbuf implement these fallbacks at all? Would a patch removing all of that code be accepted? <mclasen> when the gio support was added, there was no mimetype detection at all in gio for windows or os x <psychon> so historically it was needed and can be removed now, right? <mclasen> I think gio still doesn't do any mime detection on os x <psychon> hm, ok... so my patch is a step in the wrong direction and its bug should be closed