CryptoManager's decrypt method returns a CryptoNotice if the GPG binary can't be found on the path; however, the Message class expects a 3 element array with either a RMail::Message or nil at index 0. This patch ensures sup plays nice when importing encrypted messages from a mail-store on an environment that does not have GPG. --- lib/sup/crypto.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb index 7f044b9..afbc445 100644 --- a/lib/sup/crypto.rb +++ b/lib/sup/crypto.rb @@ -105,7 +105,7 @@ class CryptoManager ## returns decrypted_message, status, desc, lines def decrypt payload # a RubyMail::Message object - return unknown_status(cant_find_binary) unless @cmd + return [nil, nil, unknown_status(cant_find_binary)] unless @cmd payload_fn = Tempfile.new "redwood.payload" payload_fn.write payload.to_s -- 1.6.2.1 _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk