/offlineimap/head: changeset 484

Added a "force" option to imapserver/select to force a reloading of a
folder. Per [complete.org #67], when cachemessagelist() was called on
an object that was cached from a previous run, it would not re-issue
the select(). Closes: [complete.org #67]
This commit is contained in:
jgoerzen 2003-06-02 22:17:29 +01:00
parent 45265467a9
commit 96ac95c13f
3 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,12 @@
offlineimap (3.99.19) unstable; urgency=low
* Added a "force" option to imapserver/select to force a reloading of a
folder. Per [complete.org #67], when cachemessagelist() was called
on an object that was cached from a previous run, it would not
re-issue the select().
-- John Goerzen <jgoerzen@complete.org> Mon, 2 Jun 2003 07:04:53 -0500
offlineimap (3.99.18) unstable; urgency=low
* Made a fix for Python2.3 compatibility.

View File

@ -69,7 +69,7 @@ class IMAPFolder(BaseFolder):
try:
# Primes untagged_responses
imapobj.select(self.getfullname(), readonly = 1)
imapobj.select(self.getfullname(), readonly = 1, force = 1)
try:
# Some mail servers do not return an EXISTS response if
# the folder is empty.

View File

@ -30,8 +30,8 @@ class UsefulIMAPMixIn:
return self.selectedfolder
return None
def select(self, mailbox='INBOX', readonly=None):
if self.getselectedfolder() == mailbox:
def select(self, mailbox='INBOX', readonly=None, force = 0):
if (not force) and self.getselectedfolder() == mailbox:
self.is_readonly = readonly
# No change; return.
return