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

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Sep 7 13:26:00 UTC 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://lists.alioth.debian.org/pipermail/offlineimap-project/attachments/20110907/b3c19c80/attachment.pgp>


More information about the OfflineIMAP-project mailing list