If mailbox_save_cancel() was being called outside mail_storage_copy()
it assert-crashed:
Panic: file mail-storage.c: line 2168 (mailbox_save_context_reset): assertion failed: (ctx->copying_via_save)
i_assert(ctx->saving || !success);
ctx->saving = FALSE;
} else {
- i_assert(ctx->copying_via_save);
+ i_assert(ctx->copying_via_save || !success);
/* We came from mailbox_copy(). saving==TRUE is possible here
if we also came from mailbox_save_using_mail(). Don't set
saving=FALSE yet in that case, because copy() is still