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;
|
char *tmp, *tmpfile;
|
||||||
|
|
||||||
|
opts |= MU_MSG_OPTION_USE_EXISTING;
|
||||||
|
|
||||||
if (!(opts & MU_MSG_OPTION_EXTRACT_IMAGES) ||
|
if (!(opts & MU_MSG_OPTION_EXTRACT_IMAGES) ||
|
||||||
g_ascii_strcasecmp (part->type, "image") != 0)
|
g_ascii_strcasecmp (part->type, "image") != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -416,13 +416,14 @@ each_part (MuMsg *msg, MuMsgPart *part, GSList **attlist)
|
||||||
char *att, *cachefile;
|
char *att, *cachefile;
|
||||||
GError *err;
|
GError *err;
|
||||||
|
|
||||||
/* exclude things that don't look like proper attachments */
|
/* exclude things that don't look like proper attachments,
|
||||||
if (!mu_msg_part_maybe_attachment(part))
|
* unless they're images */
|
||||||
|
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,
|
cachefile = mu_msg_part_save_temp (msg, MU_MSG_OPTION_NONE,
|
||||||
MU_MSG_OPTION_NONE,
|
|
||||||
part->index, &err);
|
part->index, &err);
|
||||||
if (!cachefile) {
|
if (!cachefile) {
|
||||||
print_and_clear_g_error (&err);
|
print_and_clear_g_error (&err);
|
||||||
|
|
Loading…
Reference in New Issue