Fix "getfolders() asked to get nonexisting folder" bug
When a new remote folder was detected, we tried to create the folder locally on the Maildir and called repository.forgetfolders() to force a new scanning of the Maildir. However, that implementation used the inherited base function that did nothing. We simply needed to implement forgetfolders() to set self.folder=None, so we would force a new read in of the updated local folder structure. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
3e28073f98
commit
a280a905ca
@ -18,3 +18,7 @@ Changes
|
|||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* Fix the missing folder error that occured when a new remote folder was
|
||||||
|
detected (IMAP<->Maildir)
|
||||||
|
|
||||||
|
@ -190,4 +190,8 @@ class MaildirRepository(BaseRepository):
|
|||||||
if self.folders == None:
|
if self.folders == None:
|
||||||
self.folders = self._getfolders_scandir(self.root)
|
self.folders = self._getfolders_scandir(self.root)
|
||||||
return self.folders
|
return self.folders
|
||||||
|
|
||||||
|
def forgetfolders(self):
|
||||||
|
"""Forgets the cached list of folders, if any. Useful to run
|
||||||
|
after a sync run."""
|
||||||
|
self.folders = None
|
||||||
|
Loading…
Reference in New Issue
Block a user