Return the correct suffix in eww-make-unique-file-name

* lisp/net/eww.el (eww-make-unique-file-name): Return the correct
suffix (bug#44936).
This commit is contained in:
Akira Kyle 2020-11-29 11:40:47 +01:00 committed by Lars Ingebrigtsen
parent 17fa17be3d
commit 9939c435c1

View file

@ -1661,7 +1661,7 @@ Use link at point if there is one, else the current page's URL."
(suffix ""))
(when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
(setq stem (match-string 1 file)
suffix (match-string 2)))
suffix (match-string 2 file)))
(while (file-exists-p (expand-file-name file directory))
(setq file (format "%s(%d)%s" stem count suffix))
(setq count (1+ count)))