* mu4e: unbreak attachments in forwarded messages
This commit is contained in:
@ -878,15 +878,15 @@ mu_msg_part_maybe_attachment (MuMsgPart *part)
|
|||||||
g_return_val_if_fail (part, FALSE);
|
g_return_val_if_fail (part, FALSE);
|
||||||
|
|
||||||
/* attachments must be leaf parts */
|
/* attachments must be leaf parts */
|
||||||
if (!part->part_type && MU_MSG_PART_TYPE_LEAF)
|
if (!(part->part_type & MU_MSG_PART_TYPE_LEAF))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* non-textual inline parts are considered attachments as
|
/* non-textual parts are considered attachments as
|
||||||
* well */
|
* well */
|
||||||
if (part->part_type & MU_MSG_PART_TYPE_INLINE &&
|
/* if (!(part->part_type & MU_MSG_PART_TYPE_ATTACHMENT) && */
|
||||||
!(part->part_type & MU_MSG_PART_TYPE_TEXT_PLAIN) &&
|
/* !(part->part_type & MU_MSG_PART_TYPE_TEXT_PLAIN) && */
|
||||||
!(part->part_type & MU_MSG_PART_TYPE_TEXT_HTML))
|
/* !(part->part_type & MU_MSG_PART_TYPE_TEXT_HTML)) */
|
||||||
return TRUE;
|
/* return TRUE; */
|
||||||
|
|
||||||
return FALSE;
|
return part->part_type & MU_MSG_PART_TYPE_ATTACHMENT ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -418,12 +418,11 @@ each_part (MuMsg *msg, MuMsgPart *part, GSList **attlist)
|
|||||||
|
|
||||||
/* exclude things that don't look like proper attachments,
|
/* exclude things that don't look like proper attachments,
|
||||||
* unless they're images */
|
* unless they're images */
|
||||||
if (!mu_msg_part_maybe_attachment(part) ||
|
if (!mu_msg_part_maybe_attachment(part))
|
||||||
g_strcmp0 (part->type, "image") != 0)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
cachefile = mu_msg_part_save_temp (msg, MU_MSG_OPTION_NONE,
|
cachefile = mu_msg_part_save_temp (msg, MU_MSG_OPTION_OVERWRITE,
|
||||||
part->index, &err);
|
part->index, &err);
|
||||||
if (!cachefile) {
|
if (!cachefile) {
|
||||||
print_and_clear_g_error (&err);
|
print_and_clear_g_error (&err);
|
||||||
|
|||||||
Reference in New Issue
Block a user