commit 3715e99e763beb933392cffbb99dc61312b20cdb
parent a3b23af3ea3cd0f703fc903db9b87c4bff1830a2
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Sun, 17 May 2009 12:31:36 -0700
minor bugfix: rubymail sometimes returns a nil content_type
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -423,7 +423,8 @@ private
# Lowercase the filename because searches are easier that way
@attachments.push filename.downcase unless filename =~ /^sup-attachment-/
add_label :attachment unless filename =~ /^sup-attachment-/
- [Chunk::Attachment.new(m.header.content_type, filename, m, sibling_types)]
+ content_type = m.header.content_type || "application/unknown" # sometimes RubyMail gives us nil
+ [Chunk::Attachment.new(content_type, filename, m, sibling_types)]
## otherwise, it's body text
else