diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-09-04 14:09:19 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-09-04 14:09:19 +0200 |
commit | 2d6ce46066ba7ba7baec3831978c74293f296829 (patch) | |
tree | 3c706db653473d719fdaafeee91c3986b2bd0ace /libgnome-desktop/gnome-desktop-thumbnail.c | |
parent | 6046de9d76e1748d1d35c58f25b5c75d9029ceff (diff) | |
download | gnome-desktop-2d6ce46066ba7ba7baec3831978c74293f296829.tar.gz |
thumbnail: Fix nautilus trying to thumbnail folders
And loads of other non-thumbnailable files in a regression introduced in
3b298f60. To answer _can_thumbnail() correctly, we need to check whether
a thumbnailer exists for the mime-type in question, not simply assume it
to be available.
https://bugzilla.gnome.org/show_bug.cgi?id=785404
Diffstat (limited to 'libgnome-desktop/gnome-desktop-thumbnail.c')
-rw-r--r-- | libgnome-desktop/gnome-desktop-thumbnail.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c index c7ff6d5e..5d553494 100644 --- a/libgnome-desktop/gnome-desktop-thumbnail.c +++ b/libgnome-desktop/gnome-desktop-thumbnail.c @@ -919,7 +919,12 @@ gnome_desktop_thumbnail_factory_can_thumbnail (GnomeDesktopThumbnailFactory *fac g_mutex_lock (&factory->priv->lock); if (!gnome_desktop_thumbnail_factory_is_disabled (factory, mime_type)) - have_script = TRUE; + { + Thumbnailer *thumb; + + thumb = g_hash_table_lookup (factory->priv->mime_types_map, mime_type); + have_script = (thumb != NULL); + } g_mutex_unlock (&factory->priv->lock); if (have_script) |