dovecot-1.2: dict quota: Don't fail quota calculation if some ma...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 21 19:46:23 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/e2ec45b71119
changeset: 8469:e2ec45b71119
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 21 19:45:22 2008 +0200
description:
dict quota: Don't fail quota calculation if some mailboxes aren't accessible.
diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
src/plugins/quota/quota-count.c | 10 ++++++++--
diffs (27 lines):
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 @@ quota_count_mailbox(struct quota_root *r
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 @@ quota_count_mailbox(struct quota_root *r
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);
More information about the dovecot-cvs
mailing list