Determine folder syncing on Folder initialization
Rather than later when retrieving them by IMAP, we determine the "sync_this" value of a folder on Folder() initialization. This also fixes a bug where folder structure was not propagated when a folder was filtered out but included in the folderincludes list. Patch by Dave, split and modified slightly by Sebastian Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:

committed by
Sebastian Spaeth

parent
e7ca5b25cb
commit
e94642bb4d
@ -287,11 +287,6 @@ class IMAPRepository(BaseRepository):
|
||||
foldername = imaputil.dequote(name)
|
||||
retval.append(self.getfoldertype()(self.imapserver, foldername,
|
||||
self))
|
||||
# filter out the folder?
|
||||
if not self.folderfilter(foldername):
|
||||
self.ui.debug('imap', "Filtering out '%s'[%s] due to folderfilt"
|
||||
"er" % (foldername, self))
|
||||
retval[-1].sync_this = False
|
||||
# Add all folderincludes
|
||||
if len(self.folderincludes):
|
||||
imapobj = self.imapserver.acquireconnection()
|
||||
|
Reference in New Issue
Block a user