mdbox_storage_autodetect,
mdbox_mailbox_alloc,
mdbox_purge,
- NULL,
+ mail_storage_list_index_rebuild,
}
};
int mdbox_sync_finish(struct mdbox_sync_context **_ctx, bool success)
{
struct mdbox_sync_context *ctx = *_ctx;
+ struct mail_storage *storage = &ctx->mbox->storage->storage.storage;
int ret = success ? 0 : -1;
*_ctx = NULL;
mail_index_sync_rollback(&ctx->index_sync_ctx);
}
+ if (storage->rebuild_list_index)
+ ret = mail_storage_list_index_rebuild_and_set_uncorrupted(storage);
+
i_free(ctx);
return ret;
}
sdbox_storage_autodetect,
sdbox_mailbox_alloc,
NULL,
- NULL,
+ mail_storage_list_index_rebuild,
}
};
sdbox_storage_autodetect,
sdbox_mailbox_alloc,
NULL,
- NULL,
+ mail_storage_list_index_rebuild,
}
};
int sdbox_sync_finish(struct sdbox_sync_context **_ctx, bool success)
{
struct sdbox_sync_context *ctx = *_ctx;
+ struct mail_storage *storage = &ctx->mbox->storage->storage.storage;
int ret = success ? 0 : -1;
*_ctx = NULL;
mail_index_sync_rollback(&ctx->index_sync_ctx);
}
+ if (storage->rebuild_list_index)
+ ret = mail_storage_list_index_rebuild_and_set_uncorrupted(storage);
+
index_storage_expunging_deinit(&ctx->mbox->box);
array_free(&ctx->expunged_uids);
i_free(ctx);
#include "str-sanitize.h"
#include "mkdir-parents.h"
#include "dict.h"
+#include "fs-api.h"
#include "message-header-parser.h"
#include "mail-index-alloc-cache.h"
#include "mail-index-private.h"
dict_wait(storage->_shared_attr_dict);
dict_deinit(&storage->_shared_attr_dict);
}
+ fs_unref(&storage->mailboxes_fs);
}
static void index_storage_expunging_init(struct mailbox *box)