[dovecot-cvs] dovecot/src/plugins/quota quota-maildir.c, 1.9.2.13, 1.9.2.14

tss at dovecot.org tss at dovecot.org
Mon Mar 12 23:05:50 EET 2007


Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv2507

Modified Files:
      Tag: branch_1_0
	quota-maildir.c 
Log Message:
If maildirsize file contains only the header, recalculate the quota.



Index: quota-maildir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-maildir.c,v
retrieving revision 1.9.2.13
retrieving revision 1.9.2.14
diff -u -d -r1.9.2.13 -r1.9.2.14
--- quota-maildir.c	12 Mar 2007 20:36:45 -0000	1.9.2.13
+++ quota-maildir.c	12 Mar 2007 21:05:47 -0000	1.9.2.14
@@ -370,6 +370,11 @@
 		return 0;
 	}
 
+	if (*lines == NULL) {
+		/* no quota lines. rebuild it. */
+		return 0;
+	}
+
 	/* rest of the lines contains <bytes> <count> diffs */
 	total_bytes = 0; total_count = 0;
 	for (lines++; *lines != NULL; lines++, line_count++) {



More information about the dovecot-cvs mailing list