Recache folder list after creating a new folder

If we create a new folder we would previously not update our folder
list, which led to us skipping the synchronization of those new folders
during the initial run (subsequent runs would pick it up).

Invalidate the folder cache when we create a folder during folder
structure sync. Regetting the whole list from an IMAP server might be
slightly suboptimal from a performance point, but it is easy and will
lead to consistent results. Hopefully we will not have to create new
folders on each new run.

Reported-by: Daniel Shahaf <d.s@daniel.shahaf.name>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2011-09-30 08:58:08 +02:00
parent 3f7749016f
commit 4e89bbfe6e
5 changed files with 23 additions and 5 deletions

View File

@ -265,7 +265,7 @@ class SyncableAccount(Account):
remoterepos = self.remoterepos
localrepos = self.localrepos
statusrepos = self.statusrepos
# replicate the folderstructure from REMOTE to LOCAL
# replicate the folderstructure between REMOTE to LOCAL
if not localrepos.getconfboolean('readonly', False):
self.ui.syncfolders(remoterepos, localrepos)
remoterepos.syncfoldersto(localrepos, statusrepos)