aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Drozd2019-02-02 12:50:03 -0600
committerEli Zaretskii2019-02-08 09:40:31 +0200
commit46095a7dcb5fd6e0b79582bd14aa87f2d04f4a65 (patch)
treebb608a33851316753540e64e67c455f8dbd96f40
parent3b60a0add71f7b5bdd350d189e5d05c19b27c089 (diff)
downloademacs-46095a7dcb5fd6e0b79582bd14aa87f2d04f4a65.tar.gz
emacs-46095a7dcb5fd6e0b79582bd14aa87f2d04f4a65.zip
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)
-rw-r--r--lisp/net/eww.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index cf586e2d56f..1cc4557ce1a 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1526,7 +1526,7 @@ Differences in #targets are ignored."
1526(defun eww-download-callback (status url) 1526(defun eww-download-callback (status url)
1527 (unless (plist-get status :error) 1527 (unless (plist-get status :error)
1528 (let* ((obj (url-generic-parse-url url)) 1528 (let* ((obj (url-generic-parse-url url))
1529 (path (car (url-path-and-query obj))) 1529 (path (directory-file-name (car (url-path-and-query obj))))
1530 (file (eww-make-unique-file-name 1530 (file (eww-make-unique-file-name
1531 (eww-decode-url-file-name (file-name-nondirectory path)) 1531 (eww-decode-url-file-name (file-name-nondirectory path))
1532 eww-download-directory))) 1532 eww-download-directory)))