]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix copying binary files from zip archives
authorEli Zaretskii <eliz@gnu.org>
Sat, 11 Mar 2023 09:54:31 +0000 (11:54 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Mar 2023 09:54:31 +0000 (11:54 +0200)
* lisp/arc-mode.el (archive-copy-file): Prevent any coding
conversions when writing output files.  (Bug#62091)

lisp/arc-mode.el

index 6f3e922880da8e21697ace0df823b19d4e6c12d4..dcf7c17a878f27c99733d79dab33137e152e576e 100644 (file)
@@ -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))))))))