dovecot-2.0: lib-storage: Improved storage creation failure erro...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 16 19:42:26 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/95b08f167d68
changeset: 12969:95b08f167d68
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 16 19:39:18 2011 +0200
description:
lib-storage: Improved storage creation failure error message for "auto" driver.

diffstat:

 src/lib-storage/mail-storage.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r ac3669e24a99 -r 95b08f167d68 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Wed Nov 16 19:38:55 2011 +0200
+++ b/src/lib-storage/mail-storage.c	Wed Nov 16 19:39:18 2011 +0200
@@ -175,12 +175,16 @@
 	if (storage_class != NULL)
 		return storage_class;
 
+	(void)mail_user_get_home(ns->user, &home);
+	if (home == NULL || *home == '\0') home = "(not set)";
+
 	if (ns->set->location == NULL || *ns->set->location == '\0') {
-		(void)mail_user_get_home(ns->user, &home);
-		if (home == NULL || *home == '\0') home = "(not set)";
-
 		*error_r = t_strdup_printf(
 			"Mail storage autodetection failed with home=%s", home);
+	} else if (strncmp(ns->set->location, "auto:", 5) == 0) {
+		*error_r = t_strdup_printf(
+			"Autodetection failed for %s (home=%s)",
+			ns->set->location, home);
 	} else {
 		*error_r = t_strdup_printf(
 			"Ambiguous mail location setting, "


More information about the dovecot-cvs mailing list