]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: If INDEX=MEMORY, return index root dir as nonexistent instead of as "".
authorTimo Sirainen <tss@iki.fi>
Wed, 29 May 2013 00:27:09 +0000 (03:27 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 29 May 2013 00:27:09 +0000 (03:27 +0300)
src/lib-storage/mailbox-list.c

index 49a4c46b553a4d3c0b5642ae3c06e20a5e13cb66..5eedf047d013b3471c718b4567f7efdb97971160 100644 (file)
@@ -1271,8 +1271,15 @@ bool mailbox_list_set_get_root_path(const struct mailbox_list_settings *set,
                        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;