changeset 6582:9e7bf6becfb4 HEAD

Log a nice warning if using maildir++ quota without maildir storages.
author Timo Sirainen <tss@iki.fi>
date Sun, 21 Oct 2007 03:09:33 +0300
parents d4b2df823ca5
children 104a8929ef7c
files src/plugins/quota/quota-maildir.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/quota/quota-maildir.c	Sun Oct 21 03:00:09 2007 +0300
+++ b/src/plugins/quota/quota-maildir.c	Sun Oct 21 03:09:33 2007 +0300
@@ -537,8 +537,17 @@
 {
 	int ret;
 
-	if (!root->limits_initialized)
+	if (!root->limits_initialized) {
 		maildirquota_init_limits(root);
+		if (root->maildirsize_path == NULL) {
+			i_warning("quota maildir: No maildir storages, "
+				  "ignoring quota.");
+			return 0;
+		}
+	} else {
+		if (root->maildirsize_path == NULL)
+			return 0;
+	}
 
 	ret = maildirsize_read(root);
 	if (ret == 0) {