1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-31 20:02:42 +00:00

Fix downloading non-text files in EWW

* lisp/net/eww.el (eww-download-callback): Bind
coding-system-for-read to 'no-conversion', to avoid any code- or
EOL-conversions in downloaded files.  (Bug#30664)
This commit is contained in:
Eli Zaretskii 2018-03-02 10:44:44 +02:00
parent 832b9ece36
commit 04da8f4c29

View File

@ -1532,7 +1532,8 @@ Differences in #targets are ignored."
eww-download-directory)))
(goto-char (point-min))
(re-search-forward "\r?\n\r?\n")
(write-region (point) (point-max) file)
(let ((coding-system-for-write 'no-conversion))
(write-region (point) (point-max) file))
(message "Saved %s" file))))
(defun eww-decode-url-file-name (string)