sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 1f5cf842c54333b78a9d22ce1da1d5ef947128c5
parent 0d4fa04ab18c1412b98b56f37d2af1f6091aecca
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Sun, 28 Oct 2007 01:03:10 +0000

handle weird rubymail error where body is nil in attachment parsing

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@634 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/message-chunks.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
@@ -49,7 +49,12 @@ EOS
     def initialize content_type, filename, encoded_content, sibling_types
       @content_type = content_type
       @filename = filename
-      @raw_content = encoded_content.decode
+      @raw_content =
+        if encoded_content.body
+          encoded_content.decode
+        else
+          "For some bizarre reason, RubyMail was unable to parse this attachment.\n"
+        end
 
       @lines =
         case @content_type