Enable folderfiltering for MailDir repositories too

Currently we only filtered IMAP repositories, this patch enables filtering
for Maildir repositories too.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2011-08-29 15:09:16 +02:00
parent 9c5f73d3b3
commit 7d34060217
2 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,8 @@ Changes
* Documentation improvements concerning 'restoreatime' and some code cleanup
* Maildir repositories now also respond to folderfilter= configurations.
Bug Fixes
---------

View File

@ -173,6 +173,12 @@ class MaildirRepository(BaseRepository):
foldername,
self.getsep(),
self))
# filter out the folder?
if not self.folderfilter(foldername):
self.debug("Filtering out '%s'[%s] due to folderfilt"
"er" % (foldername, self))
retval[-1].sync_this = False
if self.getsep() == '/' and dirname != '':
# Recursively check sub-directories for folders too.
retval.extend(self._getfolders_scandir(root, foldername))