Permalink
Browse files

Re-scan list of remote folders on each sync

rather than just up-front.

fixes deb#396772
  • Loading branch information...
1 parent f0d4836 commit a381ca39774ff35d188caace73c642a9378ca2c3 @jgoerzen committed Jul 6, 2007
Showing with 10 additions and 0 deletions.
  1. +2 −0 offlineimap/accounts.py
  2. +5 −0 offlineimap/repository/Base.py
  3. +3 −0 offlineimap/repository/IMAP.py
View
@@ -146,6 +146,8 @@ def sync(self):
folderthreads.append(thread)
threadutil.threadsreset(folderthreads)
mbnames.write()
+ localrepos.forgetfolders()
+ remoterepos.forgetfolders()
localrepos.holdordropconnections()
remoterepos.holdordropconnections()
finally:
@@ -106,6 +106,11 @@ def getfolders(self):
"""Returns a list of ALL folders on this server."""
return []
+ def forgetfolders(self):
+ """Forgets the cached list of folders, if any. Useful to run
+ after a sync run."""
+ pass
+
def getsep(self):
raise NotImplementedError
@@ -160,6 +160,9 @@ def connect(self):
imapobj = self.imapserver.acquireconnection()
self.imapserver.releaseconnection(imapobj)
+ def forgetfolders(self):
+ self.folders = None
+
def getfolders(self):
if self.folders != None:
return self.folders

0 comments on commit a381ca3

Please sign in to comment.