[PATCH 2/2] mailbox IMAP4 instance attribute is set to the current selected folder.

Arnaud Fontaine arnau at debian.org
Wed Jul 6 22:08:08 BST 2011


selectedfolder instance attribute  is only set if a  folder was selected, thus
rely on mailbox attribute instead.

Signed-off-by: Arnaud Fontaine <arnau at debian.org>
---
 offlineimap/imaplibutil.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index 20ab336..284ae58 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -35,10 +35,9 @@ except ImportError:
 class UsefulIMAPMixIn:
     def getstate(self):
         return self.state
+
     def getselectedfolder(self):
-        if self.getstate() == 'SELECTED':
-            return self.selectedfolder
-        return None
+        return self.mailbox
 
     def select(self, mailbox='INBOX', readonly=None, force = 0):
         """Selects a mailbox on the IMAP server
-- 
1.7.5.4





More information about the OfflineIMAP-project mailing list