From bbd5805d7a8a940eee5c239de3e127ade95312fd Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 23 Jun 2019 13:24:40 +0100 Subject: [PATCH] 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 --- muttlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -- 2.40.0