X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Freplsbr.c;h=2cdd847e08c10a1c8e9b20c83827792b8735760c;hp=2affe310d0b90af42f122b5a1a291b9c5bece35e;hb=f41f04cf4ceca7355232cf7413e59afafccc9550;hpb=dba36faad141d652c7b84d26295537c76fd2b5be diff --git a/uip/replsbr.c b/uip/replsbr.c index 2affe31..2cdd847 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -245,19 +245,13 @@ finished: fputs( badaddrs, out); } - /* - ** Check if we should filter the message - ** or add mhbuild directives - */ + /* Check if we should filter the message */ if (filter) { fflush(out); if (ferror(out)) adios(drft, "error writing"); replfilter(inb, out, filter); - } else if (mime && mp) { - fprintf(out, "#forw [original message] +%s %s\n", - mp->foldpath, m_name(mp->lowsel)); } fflush(out); @@ -265,6 +259,15 @@ finished: adios(drft, "error writing"); fclose(out); + /* if we want mime, then add an attachment header */ + if (!filter && mime && mp) { + char buffer[BUFSIZ]; + + snprintf(buffer, sizeof buffer, "+%s %s", + mp->foldpath, m_name(mp->lowsel)); + annotate(drft, attach_hdr, buffer, 1, 0, -2, 1); + } + /* return dynamically allocated buffers */ free(scanl); for (nxtbuf = compbuffers, i = ncomps; (cptr = *savecomp++);