[PATCH] Re: IMAP.cachemessagelist(): Protect against empty folders

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Sep 7 14:26:00 BST 2011


On Tue, 06 Sep 2011 18:07:01 -0800, Dave Abrahams <dave at boostpro.com> wrote:
> Shouldn't we always ignore an error that happens only because of an
> empty folder?  The fact that IMAP classifies something as an error
> doesn't mean it should look like an error to a user.  Or am I missing
> something?

Yeah, there is no need for user configuration, we can detect empty
folders ourselves just fine. I had simplified the "max UID calculation"
and it worked fine on my server, but we need to stop explicitly on empty
folders and not ask for "FETCH 1:* (UID)" on empty folders.

The patch I just sent is a slight optimization (we don't ask the server
for the mail UIDs of folders with 0 messages), so the patch is good in
any case.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110907/b3c19c80/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list