X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fsendsbr.c;h=3eff75d97f803cba60fea318a43a26ac2649d390;hb=c4d932d08940f689b39b654a714f9ef3657690a9;hp=d866ebc925b13a75dfdd513894b5d1f7b52cf426;hpb=49e0326aeef4cdc75898bf3049bfa3c123688e0f;p=mmh diff --git a/uip/sendsbr.c b/uip/sendsbr.c index d866ebc..3eff75d 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -502,10 +502,12 @@ make_mime_composition_file_entry(char *file_name, int attachformat) } else { /* Suppress Content-Id, insert simple Content-Disposition and Content-Description with filename. */ + p = strrchr(file_name, '/'); (void) fprintf (composition_file, - "#%1$s; name=\"%2$s\" <> [%2$s]{attachment}", + "#%s; name=\"%s\" <> [%s]{attachment}", content_type, - ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1); + (p == (char *)0) ? file_name : p + 1, + (p == (char *)0) ? file_name : p + 1); } break; @@ -519,10 +521,12 @@ make_mime_composition_file_entry(char *file_name, int attachformat) } else { /* Suppress Content-Id, insert Content-Disposition with modification date and Content-Description wtih filename. */ + p = strrchr(file_name, '/'); (void) fprintf (composition_file, - "#%1$s; name=\"%2$s\" <>[%2$s]{attachment; modification-date=\"%3$s\"}", + "#%s; name=\"%s\" <>[%s]{attachment; modification-date=\"%s\"}", content_type, - ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1, + (p == (char *)0) ? file_name : p + 1, + (p == (char *)0) ? file_name : p + 1, dtime (&st.st_mtime, 0)); }