ref: 2b54d6316b99adc8738f08281eda81aa690ea781
parent: 220d88a590fb598cb1bf1bbc031e3a4506fe6eab
author: Ori Bernstein <[email protected]>
date: Sun Jan 24 01:19:56 EST 2021
message view: allow plumbing attachments Attachments would get misrecognized as mail files because they existed under the mailbox. Now, if there's a "/body" in the attachment, assume that it's not a message id, and plumb it. TODO: maybe we should pick a smarter heuristic.
--- a/win.c
+++ b/win.c
@@ -270,7 +270,7 @@
memset(m, 0, sizeof(m));
if(strncmp(text, mbox.path, strlen(mbox.path)) == 0)
- return 1;
+ return strstr(text + strlen(mbox.path), "/body") == nil;
else if(regexec(mesgpat, text, m, nelem(m))){
if(*m[1].ep == 0 || *m[1].ep == '/'){
*m[1].ep = 0;