[gnome-documents] documents: don't warn for unsupported image types



commit 245a73fdf8dd4c4b0c79b9553562f076e7d048dd
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Mar 1 19:06:46 2017 -0800

    documents: don't warn for unsupported image types

 src/documents.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index de2da06..ce2d16c 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -487,7 +487,9 @@ const DocCommon = new Lang.Class({
                                     let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(res);
                                     this._setOrigPixbuf(pixbuf);
                                 } catch (e) {
-                                    logError(e, 'Unable to create pixbuf from ' + thumbFile.get_uri());
+                                    if (!e.matches(GdkPixbuf.PixbufError, 
GdkPixbuf.PixbufError.UNKNOWN_TYPE))
+                                        logError(e, 'Unable to create pixbuf from ' + thumbFile.get_uri());
+
                                     this._failedThumbnailing = true;
                                     this._thumbPath = null;
                                     thumbFile.delete_async(GLib.PRIORITY_DEFAULT, null, null);


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