Reduce memory usage when scanning Maildirs
Patch from Michal Vitecek
This commit is contained in:
parent
7bdd4a69fa
commit
141a23849b
@ -88,8 +88,8 @@ class MaildirFolder(BaseFolder):
|
|||||||
folderstr = ',FMD5=' + foldermd5
|
folderstr = ',FMD5=' + foldermd5
|
||||||
for dirannex in ['new', 'cur']:
|
for dirannex in ['new', 'cur']:
|
||||||
fulldirname = os.path.join(self.getfullname(), dirannex)
|
fulldirname = os.path.join(self.getfullname(), dirannex)
|
||||||
files.extend([os.path.join(fulldirname, filename) for
|
files.extend(os.path.join(fulldirname, filename) for
|
||||||
filename in os.listdir(fulldirname)])
|
filename in os.listdir(fulldirname))
|
||||||
for file in files:
|
for file in files:
|
||||||
messagename = os.path.basename(file)
|
messagename = os.path.basename(file)
|
||||||
foldermatch = messagename.find(folderstr) != -1
|
foldermatch = messagename.find(folderstr) != -1
|
||||||
|
Loading…
Reference in New Issue
Block a user