[gnome-desktop] thumbnail loader: Support loading thumbnails from remote locations



commit 0df46b7d6171c81dfed61e6a173c4b43ef1f676a
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Sep 27 09:49:01 2013 +0200

    thumbnail loader: Support loading thumbnails from remote locations
    
    This broke with the previous addition of gs_file_read_noatime().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708824

 libgnome-desktop/gnome-desktop-thumbnail.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 76657e6..447da16 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -379,7 +379,10 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri,
     }
 
     if (input_stream == NULL) {
-        input_stream = gs_file_read_noatime (file, NULL, &error);
+        if (g_file_is_native (file))
+            input_stream = gs_file_read_noatime (file, NULL, &error);
+        else
+            input_stream = G_INPUT_STREAM (g_file_read (file, NULL, &error));
         if (input_stream == NULL) {
             g_warning ("Unable to create an input stream for %s: %s", uri, error->message);
             g_clear_error (&error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]