mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 14:20:46 +03:00
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.
This commit is contained in:
parent
d3a7f3abed
commit
ae61bab60b
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user