emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 04da8f4: Fix downloading non-text files in EWW


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 04da8f4: Fix downloading non-text files in EWW
Date: Fri, 2 Mar 2018 03:45:06 -0500 (EST)

branch: emacs-26
commit 04da8f4c292bf9cd666f883181afd1de32d0f67f
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/net/eww.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index caac96a..66b1767 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]