Correct readonly handling

Upstream imaplib now issues EXAMINE when readonly != None
offlineimap/imaplib.py's version always used SELECT
This commit is contained in:
John Goerzen 2007-07-04 19:19:06 +01:00
parent 691386b3d7
commit 4867d81ca4

View 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)