[Xfce4-commits] <postler:master> Pick up mime type before appending a semicolon

Christian Dywan noreply at xfce.org
Thu Dec 16 21:00:02 CET 2010


Updating branch refs/heads/master
         to 063f245d7d6ec47d5c3ac2fab77903cfb0a8bf8d (commit)
       from 9af88bb59d455599196031080f64ea1ec0c9a1cd (commit)

commit 063f245d7d6ec47d5c3ac2fab77903cfb0a8bf8d
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Dec 16 20:48:53 2010 +0100

    Pick up mime type before appending a semicolon
    
    The semicolon is used to accumulate multi-line values but
    it shouldn't confuse single-line values.

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

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 50e443a..37365a2 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -752,13 +752,11 @@ public class Postler.Content : WebKit.WebView {
                             fname = null;
                             parse_content_type (parts[1].strip (), ref cset,
                                 ref inner_boundary, ref mtype, ref fname);
-
-                            if (line.chomp ().has_suffix (";"))
-                                mtype += ";";
-                            if (mtype != "text/plain")
-                                message_part.plain_text = false;
                             message_part.filename = fname;
                             message_part.mime_type = mtype;
+                            message_part.plain_text = mtype == "text/plain";
+                            if (line.chomp ().has_suffix (";"))
+                                mtype += ";";
                         }
                         else if (field == "content-transfer-encoding") {
                             content_encoding = parts[1].strip ();



More information about the Xfce4-commits mailing list