sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 4d7bcedd7c366568ba19a0a58e3210614bfc22c0
parent 0abe45ab001907155fcef040d3b1f7c03fd253c5
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Sat, 27 Oct 2007 19:32:14 +0000

imap bugfix: out of sync source throws an exception (thanks to Ian Taylor)

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@627 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/imap.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb
@@ -270,8 +270,9 @@ private
   end
 
   def get_imap_fields id, *fields
-    imap_id = @imap_state[id][:id] or raise OutOfSyncSourceError, "Unknown message id #{id}"
+    raise OutOfSyncSourceError, "Unknown message id #{id}" unless @imap_state[id]
 
+    imap_id = @imap_state[id][:id]
     result = fetch(imap_id, (fields + ['RFC822.SIZE', 'INTERNALDATE']).uniq).first
     got_id = make_id result
     raise OutOfSyncSourceError, "IMAP message mismatch: requested #{id}, got #{got_id}." unless got_id == id