[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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 <sascha-pgp@silbe.org>
---
 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
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel