changeset 7364:1b160b2cd080 HEAD

If both byte and message count limits weren't set, we recalculated maildirsize all the time.
author Timo Sirainen <tss@iki.fi>
date Fri, 07 Mar 2008 02:46:57 +0200
parents dc24431136b3
children 33b90e21b634
files src/plugins/quota/quota-maildir.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/quota/quota-maildir.c	Thu Mar 06 13:15:30 2008 +0200
+++ b/src/plugins/quota/quota-maildir.c	Fri Mar 07 02:46:57 2008 +0200
@@ -433,8 +433,8 @@
 		return -1;
 	}
 
-	if (total_bytes > rule->bytes_limit ||
-	    total_count > rule->count_limit) {
+	if ((total_bytes > rule->bytes_limit && rule->bytes_limit != 0) ||
+	    (total_count > rule->count_limit && rule->count_limit != 0)) {
 		/* we're over quota. don't trust these values if the file
 		   contains more than the initial summary line, or if the file
 		   is older than 15 minutes. */