[Xfce4-commits] <postler:master> Ignore empty parts inserted by faulty clients

Christian Dywan noreply at xfce.org
Sat Jul 10 00:24:20 CEST 2010


Updating branch refs/heads/master
         to 49fe6c8d8021337ce195be15708d90a2574ff2a9 (commit)
       from ac8524af5b9998e913a08e744b78a1b53107069e (commit)

commit 49fe6c8d8021337ce195be15708d90a2574ff2a9
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Jul 2 22:18:01 2010 +0200

    Ignore empty parts inserted by faulty clients

 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 64b8265..63e782f 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -554,9 +554,13 @@ public class Postler.Content : WebKit.WebView {
             }
 
             int part;
-            for (part = 0; part < body_parts; part++)
+            for (part = 0; part < body_parts; part++) {
+                /* Ignore empty parts inserted by faulty clients */
+                if (body[part].str.strip () == "")
+                    continue;
                 if (mime_types[part].has_prefix ("text/"))
                     break;
+            }
             if (mime_types[part].has_prefix ("text/"))
                 display_part(part);
             else



More information about the Xfce4-commits mailing list