dovecot-2.1: lib-storage: Improved storage creation failure erro...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Nov 16 19:39:50 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/f11ce0efa6a8
changeset: 13710:f11ce0efa6a8
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 e5fb66051028 -r f11ce0efa6a8 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
@@ -180,12 +180,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