From: Eli Zaretskii Date: Sat, 11 Mar 2023 09:54:31 +0000 (+0200) Subject: Fix copying binary files from zip archives X-Git-Tag: emacs-29.0.90~204 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4803f972047;p=emacs.git Fix copying binary files from zip archives * lisp/arc-mode.el (archive-copy-file): Prevent any coding conversions when writing output files. (Bug#62091) --- diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 6f3e922880d..dcf7c17a878 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1093,7 +1093,9 @@ NEW-NAME." (with-temp-buffer (set-buffer-multibyte nil) (archive--extract-file extractor copy ename) - (write-region (point-min) (point-max) write-to)) + (let ((coding-system-for-write + (or coding-system-for-write 'no-conversion))) + (write-region (point-min) (point-max) write-to))) (unless (equal copy archive) (delete-file copy))))))))