[Xfce4-commits] <postler:master> Don't try to decode text attachments

Christian Dywan noreply at xfce.org
Wed Jan 26 20:16:03 CET 2011


Updating branch refs/heads/master
         to 2fabc536884ff27bc51a2f140604d1f9a409cc64 (commit)
       from 7d90014aac20ad17a8a3ad352ac9879cd2d20862 (commit)

commit 2fabc536884ff27bc51a2f140604d1f9a409cc64
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Jan 26 20:08:52 2011 +0100

    Don't try to decode text attachments

 postler/postler-content.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 101d61b..3c3d3d7 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -1115,7 +1115,11 @@ public class Postler.Content : WebKit.WebView {
             } else
                 assert_not_reached ();
             try {
-                FileUtils.set_data (filename, GLib.Base64.decode (message_part.body.str));
+                if (mime_type_is_text (message_part.mime_type))
+                    FileUtils.set_contents (filename, message_part.body.str);
+                else
+                    FileUtils.set_data (filename,
+                        GLib.Base64.decode (message_part.body.str));
                 uri = Filename.to_uri (filename, null);
             } catch (GLib.Error error) {
                 /* FIXME: Show error dialogue */



More information about the Xfce4-commits mailing list