From 96ac95c13fa6ef07a712cd06574972198c58f30e Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Mon, 2 Jun 2003 22:17:29 +0100 Subject: [PATCH] /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] --- offlineimap/head/debian/changelog | 9 +++++++++ offlineimap/head/offlineimap/folder/IMAP.py | 2 +- offlineimap/head/offlineimap/imapserver.py | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/offlineimap/head/debian/changelog b/offlineimap/head/debian/changelog index a1a7398..67df24f 100644 --- a/offlineimap/head/debian/changelog +++ b/offlineimap/head/debian/changelog @@ -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 Mon, 2 Jun 2003 07:04:53 -0500 + offlineimap (3.99.18) unstable; urgency=low * Made a fix for Python2.3 compatibility. diff --git a/offlineimap/head/offlineimap/folder/IMAP.py b/offlineimap/head/offlineimap/folder/IMAP.py index 0871fbf..b96a0f1 100644 --- a/offlineimap/head/offlineimap/folder/IMAP.py +++ b/offlineimap/head/offlineimap/folder/IMAP.py @@ -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. diff --git a/offlineimap/head/offlineimap/imapserver.py b/offlineimap/head/offlineimap/imapserver.py index 33b722e..c8c9078 100644 --- a/offlineimap/head/offlineimap/imapserver.py +++ b/offlineimap/head/offlineimap/imapserver.py @@ -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