dovecot-2.1: lib-storage: Added "auto" mail storage driver for f...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Nov 15 18:30:05 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/ad0136b56d6e
changeset: 13697:ad0136b56d6e
user: Timo Sirainen <tss at iki.fi>
date: Tue Nov 15 18:21:39 2011 +0200
description:
lib-storage: Added "auto" mail storage driver for forcing autodetection.
diffstat:
src/lib-storage/mail-storage.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r c8076e71c849 -r ad0136b56d6e src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c Tue Nov 15 17:40:13 2011 +0200
+++ b/src/lib-storage/mail-storage.c Tue Nov 15 18:21:39 2011 +0200
@@ -132,7 +132,15 @@
struct mail_storage *storage_class = NULL;
const char *home;
- if (driver != NULL) {
+ if (driver == NULL) {
+ /* no mail_location, autodetect */
+ } else if (strcmp(driver, "auto") == 0) {
+ /* explicit autodetection with "auto" driver. */
+ if (*list_set->root_dir == '\0') {
+ /* handle the same as with driver=NULL */
+ list_set->root_dir = NULL;
+ }
+ } else {
storage_class = mail_storage_find_class(driver);
if (storage_class == NULL) {
*error_r = t_strdup_printf(
More information about the dovecot-cvs
mailing list