Re-scan list of remote folders on each sync
rather than just up-front. fixes deb#396772
This commit is contained in:
parent
f0d48365cf
commit
a381ca3977
@ -146,6 +146,8 @@ class AccountSynchronizationMixin:
|
||||
folderthreads.append(thread)
|
||||
threadutil.threadsreset(folderthreads)
|
||||
mbnames.write()
|
||||
localrepos.forgetfolders()
|
||||
remoterepos.forgetfolders()
|
||||
localrepos.holdordropconnections()
|
||||
remoterepos.holdordropconnections()
|
||||
finally:
|
||||
|
@ -106,6 +106,11 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
"""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 @@ class IMAPRepository(BaseRepository):
|
||||
imapobj = self.imapserver.acquireconnection()
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
|
||||
def forgetfolders(self):
|
||||
self.folders = None
|
||||
|
||||
def getfolders(self):
|
||||
if self.folders != None:
|
||||
return self.folders
|
||||
|
Loading…
Reference in New Issue
Block a user