[eog] Don't try to thumbnail named pipes in the file open dialog
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Don't try to thumbnail named pipes in the file open dialog
- Date: Fri, 15 Oct 2010 15:34:35 +0000 (UTC)
commit b417c57d846bfa83045de8d74ed35e96ef345e22
Author: Felix Riemann <friemann gnome org>
Date: Fri Oct 15 17:29:36 2010 +0200
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. Fixes bug 623271.
src/eog-file-chooser.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-file-chooser.c b/src/eog-file-chooser.c
index e686b3c..4317017 100644
--- a/src/eog-file-chooser.c
+++ b/src/eog-file-chooser.c
@@ -336,11 +336,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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]