dovecot-1.1: Maildir++ quota: If there are no limits, write "0S"...

dovecot at dovecot.org dovecot at dovecot.org
Sun Oct 5 23:27:40 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/af9ec623c641
changeset: 7924:af9ec623c641
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Oct 05 23:26:55 2008 +0300
description:
Maildir++ quota: If there are no limits, write "0S" as the file header.

diffstat:

1 file changed, 2 insertions(+), 1 deletion(-)
src/plugins/quota/quota-maildir.c |    3 ++-

diffs (13 lines):

diff -r 1cda22cfd8f0 -r af9ec623c641 src/plugins/quota/quota-maildir.c
--- a/src/plugins/quota/quota-maildir.c	Sun Oct 05 20:06:09 2008 +0300
+++ b/src/plugins/quota/quota-maildir.c	Sun Oct 05 23:26:55 2008 +0300
@@ -252,7 +252,8 @@ static int maildirsize_write(struct mail
 	}
 
 	str = t_str_new(128);
-	if (rule->bytes_limit != 0) {
+	/* if we have no limits, write 0S instead of an empty line */
+	if (rule->bytes_limit != 0 || rule->count_limit == 0) {
 		str_printfa(str, "%lluS",
 			    (unsigned long long)rule->bytes_limit);
 	}


More information about the dovecot-cvs mailing list