]> git.notmuchmail.org Git - sup/commitdiff
bugfix: exception when forwarded attachment is not a known mime type
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 23 Apr 2008 01:29:39 +0000 (18:29 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 23 Apr 2008 01:29:39 +0000 (18:29 -0700)
lib/sup/modes/forward-mode.rb

index 147efb6d00dc6bf3ca0bf9f1a12ab677aee54450..b71be482d99cf29574d6bb12191acb959aa0e0cd 100644 (file)
@@ -42,7 +42,7 @@ class ForwardMode < EditMessageMode
     end
 
     attachments.each do |c|
-      mime_type = MIME::Types[c.content_type].first || MIME::Types["application/octet-stream"]
+      mime_type = MIME::Types[c.content_type].first || MIME::Types["application/octet-stream"].first
       attachment_hash[c.filename] = RMail::Message.make_attachment c.raw_content, mime_type.content_type, mime_type.encoding, c.filename
     end