* 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
This commit is contained in:
parent
c33070f492
commit
6c5a32ddbc
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue