nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit ae61bab60b69d227e6960834c0523377d94f06c2
parent d3a7f3abed66f9714a9fe6c7803f57f4b05b1a4a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 23 Aug 2021 09:51:14 +0200

files: when there is a slash after the dot, then there is no extension

This fixes https://savannah.gnu.org/bugs/?61071.

Bug existed since commit f429ebe3 from three days ago.

Diffstat:
Msrc/files.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/files.c b/src/files.c @@ -1467,7 +1467,7 @@ char *safe_tempfile(FILE **stream) extension = strrchr(openfile->filename, '.'); - if (!extension) + if (!extension || strchr(extension, '/')) extension = openfile->filename + strlen(openfile->filename); tempfile_name = nrealloc(tempdir, strlen(tempdir) + 12 + strlen(extension));