mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
Fix downloading of URLs that end in a slash
* lisp/net/eww.el (eww-download-callback): Fix download URL file name. Previously this wasn't handling download URLs correctly, resulting in all downloaded pages being named "!", "!(1)", etc. (Bug#34291)
This commit is contained in:
parent
3b60a0add7
commit
46095a7dcb
@ -1526,7 +1526,7 @@ Differences in #targets are ignored."
|
||||
(defun eww-download-callback (status url)
|
||||
(unless (plist-get status :error)
|
||||
(let* ((obj (url-generic-parse-url url))
|
||||
(path (car (url-path-and-query obj)))
|
||||
(path (directory-file-name (car (url-path-and-query obj))))
|
||||
(file (eww-make-unique-file-name
|
||||
(eww-decode-url-file-name (file-name-nondirectory path))
|
||||
eww-download-directory)))
|
||||
|
Loading…
Reference in New Issue
Block a user