# HG changeset patch # User Timo Sirainen # Date 1227289522 -7200 # Node ID e2ec45b7111980945aaf931be215103fd06d90b5 # Parent d4eab639c253bbf1b5d110200599cf42a27a0170 dict quota: Don't fail quota calculation if some mailboxes aren't accessible. diff -r d4eab639c253 -r e2ec45b71119 src/plugins/quota/quota-count.c --- a/src/plugins/quota/quota-count.c Fri Nov 21 19:24:04 2008 +0200 +++ b/src/plugins/quota/quota-count.c Fri Nov 21 19:45:22 2008 +0200 @@ -16,6 +16,7 @@ struct mail_search_context *ctx; struct mail *mail; struct mail_search_args *search_args; + enum mail_error error; uoff_t size; int ret = 0; @@ -27,8 +28,13 @@ box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_READONLY | MAILBOX_OPEN_KEEP_RECENT); - if (box == NULL) - return -1; + if (box == NULL) { + mail_storage_get_last_error(storage, &error); + if (error == MAIL_ERROR_TEMP) + return -1; + /* non-temporary error, e.g. ACLs denied access. */ + return 0; + } if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FULL_READ, 0, NULL) < 0) { mailbox_close(&box);