dovecot-2.2: layout=fs: Fixed crash with mbox when control dir w...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 20 20:57:09 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/f39c649057ea
changeset: 16070:f39c649057ea
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 20 20:56:58 2013 +0200
description:
layout=fs: Fixed crash with mbox when control dir was enabled.

diffstat:

 src/lib-storage/list/mailbox-list-fs.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 3d5a065e18bb -r f39c649057ea src/lib-storage/list/mailbox-list-fs.c
--- a/src/lib-storage/list/mailbox-list-fs.c	Wed Mar 20 20:47:46 2013 +0200
+++ b/src/lib-storage/list/mailbox-list-fs.c	Wed Mar 20 20:56:58 2013 +0200
@@ -167,10 +167,13 @@
 				  const char *name, bool set)
 {
 	struct fs_mailbox_list *list = (struct fs_mailbox_list *)_list;
+	enum mailbox_list_path_type type;
 	const char *path;
 
-	path = t_strconcat(_list->set.control_dir != NULL ?
-			   _list->set.control_dir : _list->set.root_dir,
+	type = _list->set.control_dir != NULL ?
+		MAILBOX_LIST_PATH_TYPE_CONTROL : MAILBOX_LIST_PATH_TYPE_DIR;
+
+	path = t_strconcat(mailbox_list_get_root_forced(_list, type),
 			   "/", _list->set.subscription_fname, NULL);
 	return subsfile_set_subscribed(_list, path, list->temp_prefix,
 				       name, set);


More information about the dovecot-cvs mailing list