IMAP cachefolder: Fix returning None on select

We rely on the number of mails being returned by the imapobj.select()
call, however that only happens if we "force" a real select() to occur.
Pass in the force parameter that I dropped earlier (we did not make use
of the return value when I dropped it, that is how it slipped through).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-09-13 15:17:55 +02:00 committed by Nicolas Sebrecht
parent 24db42916c
commit 7c83d505f8

View File

@ -120,7 +120,7 @@ class IMAPFolder(BaseFolder):
imapobj = self.imapserver.acquireconnection() imapobj = self.imapserver.acquireconnection()
try: try:
res_type, imapdata = imapobj.select(self.getfullname(), True) res_type, imapdata = imapobj.select(self.getfullname(), True, True)
if imapdata == [None] or imapdata[0] == '0': if imapdata == [None] or imapdata[0] == '0':
# Empty folder, no need to populate message list # Empty folder, no need to populate message list
return return