Commit 46095a7d authored by Nick Drozd's avatar Nick Drozd Committed by Eli Zaretskii
Browse files

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)
parent 3b60a0ad
Pipeline #719 passed with stage
in 42 minutes and 48 seconds
......@@ -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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment