From mboxrd@z Thu Jan 1 00:00:00 1970 From: mzulak@gmail.com (Matt Zulak) Date: Thu, 3 Sep 2009 12:38:53 -0400 Subject: [sup-talk] [PATCH] decrypt returns 3 elem array if gpg is unavailable Message-ID: <1251995933-2252-1-git-send-email-mzulak@gmail.com> 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