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:
@ -311,6 +311,10 @@ class IMAPRepository(BaseRepository):
|
||||
def makefolder(self, foldername):
|
||||
"""Create a folder on the IMAP server
|
||||
|
||||
This will not update the list cached in :meth:`getfolders`. You
|
||||
will need to invoke :meth:`forgetfolders` to force new caching
|
||||
when you are done creating folders yourself.
|
||||
|
||||
:param foldername: Full path of the folder to be created."""
|
||||
#TODO: IMHO this existing commented out code is correct and
|
||||
#should be enabled, but this would change the behavior for
|
||||
|
Reference in New Issue
Block a user