@@ -210,10 +210,11 @@ int mailbox_list_create(const char *driver, struct mail_namespace *ns,
210
210
}
211
211
212
212
e_debug (ns -> user -> event ,
213
- "%s: root=%s, index=%s, indexpvt=%s, control=%s, inbox=%s, alt=%s" ,
213
+ "%s: root=%s, index=%s, fts_index=%s, indexpvt=%s, control=%s, inbox=%s, alt=%s" ,
214
214
list -> name ,
215
215
list -> set .root_dir == NULL ? "" : list -> set .root_dir ,
216
216
list -> set .index_dir == NULL ? "" : list -> set .index_dir ,
217
+ list -> set .fts_index_dir == NULL ? "" : list -> set .fts_index_dir ,
217
218
list -> set .index_pvt_dir == NULL ? "" : list -> set .index_pvt_dir ,
218
219
list -> set .control_dir == NULL ?
219
220
"" : list -> set .control_dir ,
@@ -333,6 +334,8 @@ mailbox_list_settings_parse_full(struct mail_user *user, const char *data,
333
334
dest = & set_r -> inbox_path ;
334
335
else if (strcmp (key , "INDEX" ) == 0 )
335
336
dest = & set_r -> index_dir ;
337
+ else if (strcmp (key , "FTS_INDEX" ) == 0 )
338
+ dest = & set_r -> fts_index_dir ;
336
339
else if (strcmp (key , "INDEXPVT" ) == 0 )
337
340
dest = & set_r -> index_pvt_dir ;
338
341
else if (strcmp (key , "INDEXCACHE" ) == 0 )
@@ -1485,6 +1488,22 @@ bool mailbox_list_set_get_root_path(const struct mailbox_list_settings *set,
1485
1488
path = set -> root_dir ;
1486
1489
}
1487
1490
break ;
1491
+ case MAILBOX_LIST_PATH_TYPE_FTS_INDEX :
1492
+ if (set -> fts_index_dir != NULL ) {
1493
+ if (set -> fts_index_dir [0 ] == '\0' ) {
1494
+ /* in-memory indexes */
1495
+ return 0 ;
1496
+ }
1497
+ path = set -> fts_index_dir ;
1498
+
1499
+ /* Preserve the old behavior of using the index directory if
1500
+ * fts_index_dir is not set. */
1501
+ } else if (set -> index_dir != NULL ) {
1502
+ path = set -> index_dir ;
1503
+ } else {
1504
+ path = set -> root_dir ;
1505
+ }
1506
+ break ;
1488
1507
case MAILBOX_LIST_PATH_TYPE_INDEX_PRIVATE :
1489
1508
path = set -> index_pvt_dir ;
1490
1509
break ;
0 commit comments