dovecot-2.1: lib-storage: When autocreating a namespace, don't f...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 21 02:59:40 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/488fe9d417eb
changeset: 14175:488fe9d417eb
user: Timo Sirainen <tss at iki.fi>
date: Tue Feb 21 02:59:25 2012 +0200
description:
lib-storage: When autocreating a namespace, don't fill out location setting unless necessary.
This fixes running dsync when there are no namespaces defined.
diffstat:
src/lib-storage/mail-namespace.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (42 lines):
diff -r 10994a5b64e1 -r 488fe9d417eb src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c Tue Feb 21 02:43:52 2012 +0200
+++ b/src/lib-storage/mail-namespace.c Tue Feb 21 02:59:25 2012 +0200
@@ -320,7 +320,7 @@
{
struct mail_namespace_settings *inbox_set, *unexpanded_inbox_set;
struct mail_namespace *ns;
- const struct mail_storage_settings *mail_set, *unexpanded_mail_set;
+ const struct mail_storage_settings *mail_set;
const char *error, *driver, *location_source;
i_assert(location == NULL || *location != '\0');
@@ -345,13 +345,8 @@
inbox_set->location = p_strdup(user->pool, location);
location_source = "mail_location parameter";
} else if (*mail_set->mail_location != '\0') {
- unexpanded_mail_set = mail_user_set_get_driver_settings(
- user->set_info, user->unexpanded_set,
- MAIL_STORAGE_SET_DRIVER_NAME);
-
- inbox_set->location = mail_set->mail_location;
- unexpanded_inbox_set->location =
- unexpanded_mail_set->mail_location;
+ /* don't actually set it to namespace, since we'll default to
+ it anyway */
location_source = "mail_location setting";
} else {
location_source = "environment MAIL";
@@ -367,10 +362,12 @@
location_source = "environment MAILDIR";
}
}
- if (*unexpanded_inbox_set->location == '\0') {
+ if (*inbox_set->location != '\0') {
unexpanded_inbox_set->location =
p_strconcat(user->pool, SETTING_STRVAR_EXPANDED,
inbox_set->location, NULL);
+ } else {
+ unexpanded_inbox_set->location = SETTING_STRVAR_UNEXPANDED;
}
ns->set = inbox_set;
More information about the dovecot-cvs
mailing list