dovecot-2.2: lib-storage: If INDEX=MEMORY, return index root dir...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 29 03:27:37 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/1a565186aee0
changeset: 16413:1a565186aee0
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 29 03:27:09 2013 +0300
description:
lib-storage: If INDEX=MEMORY, return index root dir as nonexistent instead of as "".

diffstat:

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

diffs (21 lines):

diff -r 429a8cd829d6 -r 1a565186aee0 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Wed May 29 03:26:41 2013 +0300
+++ b/src/lib-storage/mailbox-list.c	Wed May 29 03:27:09 2013 +0300
@@ -1271,8 +1271,15 @@
 			set->control_dir : set->root_dir;
 		break;
 	case MAILBOX_LIST_PATH_TYPE_INDEX:
-		path = set->index_dir != NULL ?
-			set->index_dir : set->root_dir;
+		if (set->index_dir != NULL) {
+			if (set->index_dir[0] == '\0') {
+				/* in-memory indexes */
+				return 0;
+			}
+			path = set->index_dir;
+		} else {
+			path = set->root_dir;
+		}
 		break;
 	case MAILBOX_LIST_PATH_TYPE_INDEX_PRIVATE:
 		path = set->index_pvt_dir;


More information about the dovecot-cvs mailing list