return cmd->client->mailbox;
box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_SAVEONLY |
- MAILBOX_OPEN_FAST | MAILBOX_OPEN_KEEP_RECENT);
+ MAILBOX_OPEN_KEEP_RECENT);
if (box == NULL) {
client_send_storage_error(cmd, storage);
return NULL;
else {
destbox = mailbox_open(&storage, mailbox, NULL,
MAILBOX_OPEN_SAVEONLY |
- MAILBOX_OPEN_FAST |
MAILBOX_OPEN_KEEP_RECENT);
if (destbox == NULL) {
client_send_storage_error(cmd, storage);
struct mail_namespace *ns;
struct mailbox *box;
enum mail_error error;
- enum mailbox_open_flags open_flags = MAILBOX_OPEN_FAST |
+ enum mailbox_open_flags open_flags =
MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_SAVEONLY |
MAILBOX_OPEN_POST_SESSION;
struct index_mailbox *ibox = (struct index_mailbox *)box;
const struct mail_index_header *hdr;
- if (!box->opened)
- index_storage_mailbox_open(ibox);
+ i_assert(box->opened);
memset(status_r, 0, sizeof(struct mailbox_status));
struct index_transaction_context *it;
enum mail_index_transaction_flags trans_flags;
- if (!box->opened)
- index_storage_mailbox_open(ibox);
+ i_assert(box->opened);
trans_flags = MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES;
if ((flags & MAILBOX_TRANSACTION_FLAG_HIDE) != 0)
MAILBOX_OPEN_READONLY = 0x01,
/* Only saving/copying mails to mailbox works. */
MAILBOX_OPEN_SAVEONLY = 0x02,
- /* Any extra time consuming operations shouldn't be performed
- (eg. when opening mailbox just for STATUS). */
+ /* Delay opening index files (and possibly other files) until mailbox
+ is being synchronized. */
MAILBOX_OPEN_FAST = 0x04,
/* Don't reset MAIL_RECENT flags when syncing */
MAILBOX_OPEN_KEEP_RECENT = 0x08,
mailbox locked so that other processes can't mess up the quota
calculations by adding/removing mails while we're doing this. */
storage = qlist->storage;
- box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_FAST |
- MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_KEEP_LOCKED);
+ box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_KEEP_RECENT |
+ MAILBOX_OPEN_KEEP_LOCKED);
if (box == NULL) {
str = mail_storage_get_last_error(qlist->storage, &error);
if (error != MAIL_ERROR_NOTPOSSIBLE) {