From 8177977dca2a3b0805d78183bf9fe09637ca5bb5 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 25 Jul 2014 14:14:52 +0200 Subject: Don't try to thumbnail named pipes in the file open dialog In fact this means all "special" files like sockets and device files. This prevents lockups due to file I/O blocking here. Eog bug http://bugzilla.gnome.org/show_bug.cgi?id=623271 Based on eog commit b417c57d846bfa83045de8d74ed35e96ef345e22 From Felix Riemann --- src/eom-file-chooser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/eom-file-chooser.c b/src/eom-file-chooser.c index 7d5dda6..6eaf30e 100644 --- a/src/eom-file-chooser.c +++ b/src/eom-file-chooser.c @@ -337,11 +337,13 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) file = g_file_new_for_uri (uri); file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED "," + G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_SIZE, 0, NULL, NULL); g_object_unref (file); - if ((file_info != NULL) && (priv->thumb_factory != NULL)) { + if ((file_info != NULL) && (priv->thumb_factory != NULL) + && g_file_info_get_file_type (file_info) != G_FILE_TYPE_SPECIAL) { guint64 mtime; mtime = g_file_info_get_attribute_uint64 (file_info, -- cgit v1.2.1