dovecot-1.1: When updating maildir quota create also missing mai...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 4 03:44:12 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/2475c57fadb0
changeset: 7476:2475c57fadb0
user:      Timo Sirainen <tss at iki.fi>
date:      Sun May 04 03:44:09 2008 +0300
description:
When updating maildir quota create also missing maildirsize file and make
sure the limits in the header are up-to-date.

diffstat:

1 file changed, 7 insertions(+), 2 deletions(-)
src/plugins/quota/quota-maildir.c |    9 +++++++--

diffs (19 lines):

diff -r 4407ef392711 -r 2475c57fadb0 src/plugins/quota/quota-maildir.c
--- a/src/plugins/quota/quota-maildir.c	Sun May 04 03:22:49 2008 +0300
+++ b/src/plugins/quota/quota-maildir.c	Sun May 04 03:44:09 2008 +0300
@@ -738,8 +738,13 @@ maildir_quota_update(struct quota_root *
 		/* no limits */
 		return 0;
 	}
-	/* make sure the latest file is opened. */
-	(void)maildirsize_open(root);
+
+	/* even though we don't really care about the limits in here ourself,
+	   we do want to make sure the header gets updated if the limits have
+	   changed. also this makes sure the maildirsize file is created if
+	   it doesn't exist. */
+	if (maildirquota_refresh(root) < 0)
+		return -1;
 
 	if (root->fd == -1 || ctx->recalculate ||
 	    maildirsize_update(root, ctx->count_used, ctx->bytes_used) < 0)


More information about the dovecot-cvs mailing list