The ostream can be finished even if the saving had already failed. It gets
deleted anyway.
Fixes:
Panic: file ostream-zlib.c: line 37 (o_stream_zlib_close): assertion failed: (zstream->ostream.finished || zstream->ostream.ostream.stream_errno != 0 || zstream->ostream.error_handling_disabled)
}
path = t_strconcat(ctx->tmpdir, "/", ctx->file_last->tmp_name, NULL);
- if (!ctx->failed && o_stream_finish(_ctx->data.output) < 0) {
+ if (o_stream_finish(_ctx->data.output) < 0) {
if (!mail_storage_set_error_from_errno(storage)) {
mail_set_critical(_ctx->dest_mail,
"write(%s) failed: %s", path,