From: Richard Russon Date: Sun, 23 Jun 2019 12:24:40 +0000 (+0100) Subject: fix re-opening attachments X-Git-Tag: 2019-10-25~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbd5805d7a8a940eee5c239de3e127ade95312fd;p=neomutt fix re-opening attachments When opening an attachment with a two part suffix, e.g. `.tar.gz` NeoMutt created a temporary file with just `.gz`. Hack the splitting logic to give a useful suffix Fixes: #1699 --- diff --git a/muttlib.c b/muttlib.c index 48b8369f3..72d462c00 100644 --- a/muttlib.c +++ b/muttlib.c @@ -104,7 +104,7 @@ void mutt_adv_mktemp(struct Buffer *buf) if ((lstat(mutt_b2s(buf), &sb) == -1) && (errno == ENOENT)) goto out; - char *suffix = strrchr(prefix->data, '.'); + char *suffix = strchr(prefix->data, '.'); if (suffix) { *suffix = '\0';