mirror of https://github.com/djcb/mu.git
* mu: try harder to create temp files for images (so we can show them in mu4e)
This commit is contained in:
parent
7cb695b787
commit
55f7ecd362
|
@ -226,6 +226,8 @@ get_temp_file_maybe (MuMsg *msg, MuMsgPart *part, MuMsgOptions opts)
|
|||
{
|
||||
char *tmp, *tmpfile;
|
||||
|
||||
opts |= MU_MSG_OPTION_USE_EXISTING;
|
||||
|
||||
if (!(opts & MU_MSG_OPTION_EXTRACT_IMAGES) ||
|
||||
g_ascii_strcasecmp (part->type, "image") != 0)
|
||||
return NULL;
|
||||
|
|
|
@ -416,13 +416,14 @@ each_part (MuMsg *msg, MuMsgPart *part, GSList **attlist)
|
|||
char *att, *cachefile;
|
||||
GError *err;
|
||||
|
||||
/* exclude things that don't look like proper attachments */
|
||||
if (!mu_msg_part_maybe_attachment(part))
|
||||
/* exclude things that don't look like proper attachments,
|
||||
* unless they're images */
|
||||
if (!mu_msg_part_maybe_attachment(part) ||
|
||||
g_strcmp0 (part->type, "image") != 0)
|
||||
return;
|
||||
|
||||
err = NULL;
|
||||
cachefile = mu_msg_part_save_temp (msg,
|
||||
MU_MSG_OPTION_NONE,
|
||||
cachefile = mu_msg_part_save_temp (msg, MU_MSG_OPTION_NONE,
|
||||
part->index, &err);
|
||||
if (!cachefile) {
|
||||
print_and_clear_g_error (&err);
|
||||
|
|
Loading…
Reference in New Issue