From: wmorgan Date: Sun, 28 Oct 2007 01:03:10 +0000 (+0000) Subject: handle weird rubymail error where body is nil in attachment parsing X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=1f5cf842c54333b78a9d22ce1da1d5ef947128c5;p=sup 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 --- diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 6da21aa..477ba64 100644 --- 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