summaryrefslogtreecommitdiffstats
path: root/copy.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-12-10 14:07:19 -0800
committerKevin McCarthy <kevin@8t8.us>2020-12-12 13:17:09 -0800
commitb860ea2f02c32d9108f0522c2315df208daacb35 (patch)
treef98c821c22a6e4e692481308efbefea09f0b6220 /copy.c
parentc6868e1f935f7bcd2b000f81d60930b07925d718 (diff)
Add "headers" parameter to mx_open_message().
This will allow some operations to retrieve only headers, such as ~h pattern matching or the new list menu. Modify the IMAP and POP3 implementation to retrieve only headers when the parameter is set. Headers-only will use the message cache if one exists, but will not populate the message cache (since the body of the message is not downloaded.)
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/copy.c b/copy.c
index 238f22d1..ad34f4a0 100644
--- a/copy.c
+++ b/copy.c
@@ -756,7 +756,7 @@ mutt_copy_message (FILE *fpout, CONTEXT *src, HEADER *hdr, int flags,
MESSAGE *msg;
int r;
- if ((msg = mx_open_message (src, hdr->msgno)) == NULL)
+ if ((msg = mx_open_message (src, hdr->msgno, 0)) == NULL)
return -1;
r = _mutt_copy_message (fpout, msg->fp, hdr, hdr->content, flags, chflags);
if ((r >= 0) && (ferror (fpout) || feof (fpout)))
@@ -814,7 +814,7 @@ mutt_append_message (CONTEXT *dest, CONTEXT *src, HEADER *hdr, int cmflags,
MESSAGE *msg;
int r;
- if ((msg = mx_open_message (src, hdr->msgno)) == NULL)
+ if ((msg = mx_open_message (src, hdr->msgno, 0)) == NULL)
return -1;
r = _mutt_append_message (dest, msg->fp, src, hdr, hdr->content, cmflags, chflags);
mx_close_message (src, &msg);