X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=e1cd5b6b29d0603f82c275c8c036fe2025f39613;hp=c59030996b4747e5f613e17aaa80bdf23725e15c;hb=61fec8f6b3bff64d96d016a14729ab1ea2c4a2e8;hpb=2a06362a155582cd59ae2ef6f0df71694a7eede3 diff --git a/attach.c b/attach.c index c590309..e1cd5b6 100644 --- a/attach.c +++ b/attach.c @@ -66,7 +66,7 @@ int mutt_get_tmp_attachment (BODY * a) if ((fpin = fopen (a->filename, "r")) && (fpout = safe_fopen (tempfile, "w"))) { /* __FOPEN_CHECKED__ */ mutt_copy_stream (fpin, fpout); - str_replace (&a->filename, tempfile); + m_strreplace(&a->filename, tempfile); a->unlink = 1; if (a->stamp >= st.st_mtime) @@ -322,9 +322,11 @@ void mutt_check_lookup_list (BODY * b, char *type, int len) ascii_strncasecmp (type, t->data, i) == 0) || ascii_strcasecmp (type, t->data) == 0) { - BODY tmp = { 0 }; + BODY tmp; int n; + p_clear(&tmp, 1); + if ((n = mutt_lookup_mime_type (&tmp, b->filename)) != TYPEOTHER) { snprintf (type, len, "%s/%s", n == TYPEAUDIO ? "audio" :