]> code.delx.au - offlineimap/commitdiff
Correct readonly handling
authorJohn Goerzen <jgoerzen@complete.org>
Wed, 4 Jul 2007 18:19:06 +0000 (19:19 +0100)
committerJohn Goerzen <jgoerzen@complete.org>
Wed, 4 Jul 2007 18:19:06 +0000 (19:19 +0100)
Upstream imaplib now issues EXAMINE when readonly != None
offlineimap/imaplib.py's version always used SELECT

offlineimap/imapserver.py

index 6ea25ebd5bf1912b47e4f0f0ca597eaf7d61148c..b89f9dc06757406dd3917bb52a2ff892833bc76d 100644 (file)
@@ -32,8 +32,8 @@ class UsefulIMAPMixIn:
         return None
 
     def select(self, mailbox='INBOX', readonly=None, force = 0):
-        if (not force) and self.getselectedfolder() == mailbox:
-            self.is_readonly = readonly
+        if (not force) and self.getselectedfolder() == mailbox \
+           and self.is_readonly == readonly:
             # No change; return.
             return
         result = self.__class__.__bases__[1].select(self, mailbox, readonly)