static bool save_is_attachment(struct mail_save_context *ctx,
struct message_part *part)
{
- struct mailbox *box = ctx->transaction->box;
struct mail_attachment_part apart;
if ((part->flags & MESSAGE_PART_FLAG_MULTIPART) != 0) {
but they're never themselves */
return FALSE;
}
- if (box->v.save_is_attachment == NULL)
+ if (ctx->part_is_attachment == NULL)
return TRUE;
memset(&apart, 0, sizeof(apart));
apart.part = part;
apart.content_type = ctx->attach->part.content_type;
apart.content_disposition = ctx->attach->part.content_disposition;
- return box->v.save_is_attachment(ctx, &apart);
+ return ctx->part_is_attachment(ctx, &apart);
}
static int index_attachment_save_temp_open_fd(struct mail_storage *storage)
int (*save_finish)(struct mail_save_context *ctx);
void (*save_cancel)(struct mail_save_context *ctx);
int (*copy)(struct mail_save_context *ctx, struct mail *mail);
- /* returns TRUE if message part is an attachment. */
- bool (*save_is_attachment)(struct mail_save_context *ctx,
- const struct mail_attachment_part *part);
bool (*is_inconsistent)(struct mailbox *box);
};
struct mail_save_attachment *attach;
+ /* returns TRUE if message part is an attachment. */
+ bool (*part_is_attachment)(struct mail_save_context *ctx,
+ const struct mail_attachment_part *part);
+
/* we came here from mailbox_copy() */
unsigned int copying:1;
};