diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py index fd8496e..ad11158 100644 --- a/offlineimap/folder/Base.py +++ b/offlineimap/folder/Base.py @@ -318,7 +318,7 @@ class BaseFolder: flags = self.getmessageflags(uid) rtime = self.getmessagetime(uid) - if uid in dstfolder.getmessagelist(): + if dstfolder.uidexists(uid): # dst has message with that UID already, only update status statusfolder.savemessage(uid, None, flags, rtime) return diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 8c7b68d..f2d0dda 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -94,7 +94,7 @@ class IMAPFolder(BaseFolder): maxmsgid = max(long(msgid), maxmsgid) # Different number of messages than last time? - if maxmsgid != len(statusfolder.getmessagelist()): + if maxmsgid != statusfolder.getmessagecount(): return True if maxmsgid < 1: @@ -112,7 +112,7 @@ class IMAPFolder(BaseFolder): if not options.has_key('UID'): return True uid = long(options['UID']) - saveduids = statusfolder.getmessagelist().keys() + saveduids = statusfolder.getmessageuidlist() saveduids.sort() if uid != saveduids[-1]: return True @@ -395,7 +395,7 @@ class IMAPFolder(BaseFolder): self.ui.debug('imap', 'savemessage: called') # already have it, just save modified flags - if uid > 0 and uid in self.messagelist: + if uid > 0 and self.uidexists(uid): self.savemessageflags(uid, flags) return uid