From 141a23849bcd62109e1946e6820ab44417dbd6e6 Mon Sep 17 00:00:00 2001 From: John Goerzen Date: Tue, 7 Jul 2009 00:52:00 -0500 Subject: [PATCH] Reduce memory usage when scanning Maildirs Patch from Michal Vitecek --- offlineimap/folder/Maildir.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index 33da1a0..811d759 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -88,8 +88,8 @@ class MaildirFolder(BaseFolder): folderstr = ',FMD5=' + foldermd5 for dirannex in ['new', 'cur']: fulldirname = os.path.join(self.getfullname(), dirannex) - files.extend([os.path.join(fulldirname, filename) for - filename in os.listdir(fulldirname)]) + files.extend(os.path.join(fulldirname, filename) for + filename in os.listdir(fulldirname)) for file in files: messagename = os.path.basename(file) foldermatch = messagename.find(folderstr) != -1