Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-storage/mailbox-list.c @ 6668:4a3cc2968040 HEAD
Support for looking up dbox files from an alternative directory if they're
not found from the primary directory.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 03 Nov 2007 16:09:05 +0200 |
parents | e1fde9940f7e |
children | 083681d2f4fb |
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c Sat Nov 03 14:55:14 2007 +0200 +++ b/src/lib-storage/mailbox-list.c Sat Nov 03 16:09:05 2007 +0200 @@ -109,13 +109,16 @@ int mailbox_list_settings_parse(const char *data, struct mailbox_list_settings *set, - const char **layout, const char **error_r) + const char **layout, const char **alt_dir_r, + const char **error_r) { const char *const *tmp, *key, *value; i_assert(*data != '\0'); *error_r = NULL; + if (alt_dir_r != NULL) + *alt_dir_r = NULL; /* <root dir> */ tmp = t_strsplit(data, ":"); @@ -138,6 +141,8 @@ set->index_dir = fix_path(value); else if (strcmp(key, "CONTROL") == 0) set->control_dir = fix_path(value); + else if (strcmp(key, "ALT") == 0 && alt_dir_r != NULL) + *alt_dir_r = fix_path(value); else if (strcmp(key, "LAYOUT") == 0) *layout = value; else if (strcmp(key, "SUBSCRIPTIONS") == 0)