Subject: [sup-devel] [PATCH] Don't choke when scanning message with unknown encoding

From: Sascha Silbe <[email-masked]>
Date: Tue, 29 Jun 2010 10:04:54 +0200

This fixes the following error:

./lib/sup/message.rb:473:in `message_to_chunks': "7BIT" (RMail::EncodingUnsupportedError)

when running sup-sync on a folder that contains a mail with these headers:

Content-Transfer-Encoding: 7bit
X-Mime-Autoconverted: from 8bit to 7bit by courier 0.60

Signed-off-by: Sascha Silbe <[email-masked]>
---
 lib/sup/message.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 1385585..a13fc0c 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -259,7 +259,7 @@ class Message
           rmsg = source.load_message(source_info)
           parse_header rmsg.header
           message_to_chunks rmsg
-        rescue SourceError, SocketError => e
+        rescue SourceError, SocketError, RMail::EncodingUnsupportedError => e
           warn "problem getting messages from #{source}: #{e.message}"
           ## we need force_to_top here otherwise this window will cover
           ## up the error message one
-- 
1.6.5

_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Rich Lane <[email-masked]>
Date: Fri, 02 Jul 2010 22:31:53 -0400

Applied to master.