]> git.cworth.org Git - sup/blobdiff - lib/sup/imap.rb
Gmail style attachment processing
[sup] / lib / sup / imap.rb
index c50d9438c02896e6ce4d1dac4418cea5e5cff0e6..1d369767c43106fdb19737244f172adbba8f644c 100644 (file)
@@ -63,15 +63,12 @@ class IMAP < Source
     @username = username
     @password = password
     @imap = nil
-    @imap_mutex = nil
     @imap_state = {}
     @ids = []
     @last_scan = nil
     @labels = ((labels || []) - LabelManager::RESERVED_LABELS).uniq.freeze
     @say_id = nil
     @mutex = Mutex.new
-
-    @@imap_connections ||= {}
   end
 
   def self.suggest_labels_for path
@@ -179,7 +176,7 @@ class IMAP < Source
 
   def end_offset
     unsynchronized_scan_mailbox
-    @ids.last
+    @ids.last + 1
   end
   synchronized :end_offset