Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7476:2475c57fadb0 HEAD
When updating maildir quota create also missing maildirsize file and make
sure the limits in the header are up-to-date.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 04 May 2008 03:44:09 +0300 |
parents | 4407ef392711 |
children | 841209428d2d |
files | src/plugins/quota/quota-maildir.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ /* 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)