@@ -340,47 +340,23 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri,
340340 gboolean has_frame ;
341341 SizePrepareContext info ;
342342 GFile * file ;
343- GFileInfo * file_info ;
344343 GInputStream * input_stream ;
345344 GError * error = NULL ;
346345
347346 g_return_val_if_fail (uri != NULL , NULL );
348-
349347 input_stream = NULL ;
350348
351349 file = g_file_new_for_uri (uri );
352350
353- /* First see if we can get an input stream via preview::icon */
354- file_info = g_file_query_info (file ,
355- G_FILE_ATTRIBUTE_PREVIEW_ICON ,
356- G_FILE_QUERY_INFO_NONE ,
357- NULL , /* GCancellable */
358- NULL ); /* return location for GError */
359- if (file_info != NULL ) {
360- GObject * object ;
361-
362- object = g_file_info_get_attribute_object (file_info ,
363- G_FILE_ATTRIBUTE_PREVIEW_ICON );
364- if (object != NULL && G_IS_LOADABLE_ICON (object )) {
365- input_stream = g_loadable_icon_load (G_LOADABLE_ICON (object ),
366- 0 , /* size */
367- NULL , /* return location for type */
368- NULL , /* GCancellable */
369- NULL ); /* return location for GError */
370- }
371- g_object_unref (file_info );
372- }
373-
351+ input_stream = G_INPUT_STREAM (g_file_read (file , NULL , & error ));
374352 if (input_stream == NULL ) {
375- input_stream = G_INPUT_STREAM (g_file_read (file , NULL , & error ));
376- if (input_stream == NULL ) {
377- if (error != NULL ) {
378- g_warning ("Unable to create an input stream for %s: %s" , uri , error -> message );
379- g_clear_error (& error );
380- }
381- g_object_unref (file );
382- return NULL ;
353+ if (error != NULL ) {
354+ g_warning ("Unable to create an input stream for %s: %s" , uri , error -> message );
355+ g_clear_error (& error );
383356 }
357+
358+ g_object_unref (file );
359+ return NULL ;
384360 }
385361
386362 has_frame = FALSE;
0 commit comments