mirror of https://github.com/djcb/mu.git
Fix #186 part 2
This patch fixes the attachment listing when using `mu`. For some reason the '--decrypt' option among others where totally ignored when listing the attachments.
This commit is contained in:
parent
29e53d2eba
commit
91250b0d71
|
@ -48,7 +48,7 @@ view_msg_sexp (MuMsg *msg, MuConfig *opts)
|
||||||
{
|
{
|
||||||
char *sexp;
|
char *sexp;
|
||||||
|
|
||||||
sexp = mu_msg_to_sexp (msg, 0, NULL, MU_MSG_OPTION_NONE);
|
sexp = mu_msg_to_sexp (msg, 0, NULL, mu_config_get_msg_options(opts));
|
||||||
fputs (sexp, stdout);
|
fputs (sexp, stdout);
|
||||||
g_free (sexp);
|
g_free (sexp);
|
||||||
|
|
||||||
|
@ -78,12 +78,12 @@ each_part (MuMsg *msg, MuMsgPart *part, gchar **attach)
|
||||||
|
|
||||||
/* return comma-sep'd list of attachments */
|
/* return comma-sep'd list of attachments */
|
||||||
static gchar *
|
static gchar *
|
||||||
get_attach_str (MuMsg *msg)
|
get_attach_str (MuMsg *msg, MuConfig *opts)
|
||||||
{
|
{
|
||||||
gchar *attach;
|
gchar *attach;
|
||||||
|
|
||||||
attach = NULL;
|
attach = NULL;
|
||||||
mu_msg_part_foreach (msg, MU_MSG_OPTION_NONE,
|
mu_msg_part_foreach (msg, mu_config_get_msg_options(opts),
|
||||||
(MuMsgPartForeachFunc)each_part, &attach);
|
(MuMsgPartForeachFunc)each_part, &attach);
|
||||||
return attach;
|
return attach;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ view_msg_plain (MuMsg *msg, MuConfig *opts)
|
||||||
g_free (tags);
|
g_free (tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((attachs = get_attach_str (msg))) {
|
if ((attachs = get_attach_str (msg, opts))) {
|
||||||
print_field ("Attachments", attachs, color);
|
print_field ("Attachments", attachs, color);
|
||||||
g_free (attachs);
|
g_free (attachs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue