Commit 6c5a32dd authored by Michael Albinus's avatar Michael Albinus

* net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a

local copy of FILENAME, when it is remote.

Fixes: debbugs:18751
parent c33070f4
2014-11-03 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a
local copy of FILENAME, when it is remote. (Bug#18751)
2014-11-02 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise
......
......@@ -2061,11 +2061,15 @@ FILENAME is the source file, NEWNAME the target file.
KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
(with-temp-buffer
;; We must disable multibyte, because binary data shall not be
;; converted.
;; converted. `insert-file-contents-literally' does not support
;; file name handlers for GNU Emacs; we must create a local copy
;; therefore.
(set-buffer-multibyte nil)
(let ((coding-system-for-read 'binary)
(jka-compr-inhibit t))
(insert-file-contents-literally filename))
(jka-compr-inhibit t)
(tmpfile (file-local-copy filename)))
(insert-file-contents-literally (or tmpfile filename))
(when tmpfile (delete-file tmpfile)))
;; We don't want the target file to be compressed, so we let-bind
;; `jka-compr-inhibit' to t.
(let ((coding-system-for-write 'binary)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment