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)
|
folderthreads.append(thread)
|
||||||
threadutil.threadsreset(folderthreads)
|
threadutil.threadsreset(folderthreads)
|
||||||
mbnames.write()
|
mbnames.write()
|
||||||
|
localrepos.forgetfolders()
|
||||||
|
remoterepos.forgetfolders()
|
||||||
localrepos.holdordropconnections()
|
localrepos.holdordropconnections()
|
||||||
remoterepos.holdordropconnections()
|
remoterepos.holdordropconnections()
|
||||||
finally:
|
finally:
|
||||||
|
@ -106,6 +106,11 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
|||||||
"""Returns a list of ALL folders on this server."""
|
"""Returns a list of ALL folders on this server."""
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
def forgetfolders(self):
|
||||||
|
"""Forgets the cached list of folders, if any. Useful to run
|
||||||
|
after a sync run."""
|
||||||
|
pass
|
||||||
|
|
||||||
def getsep(self):
|
def getsep(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@ -160,6 +160,9 @@ class IMAPRepository(BaseRepository):
|
|||||||
imapobj = self.imapserver.acquireconnection()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
self.imapserver.releaseconnection(imapobj)
|
self.imapserver.releaseconnection(imapobj)
|
||||||
|
|
||||||
|
def forgetfolders(self):
|
||||||
|
self.folders = None
|
||||||
|
|
||||||
def getfolders(self):
|
def getfolders(self):
|
||||||
if self.folders != None:
|
if self.folders != None:
|
||||||
return self.folders
|
return self.folders
|
||||||
|
Loading…
Reference in New Issue
Block a user