aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2014-11-03 15:29:51 +0100
committerMichael Albinus2014-11-03 15:29:51 +0100
commit6c5a32ddbc3b3442918ea6ad1af53aced2b6f7f5 (patch)
tree188c872bd4eb1d387c84ef3702c2f5ff56c098f1 /lisp
parentc33070f492388b5e4d7b39ef7ff04957676e80d8 (diff)
downloademacs-6c5a32ddbc3b3442918ea6ad1af53aced2b6f7f5.tar.gz
emacs-6c5a32ddbc3b3442918ea6ad1af53aced2b6f7f5.zip
* 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
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/tramp-sh.el10
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 07231507bae..41e1039347c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-11-03 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a
4 local copy of FILENAME, when it is remote. (Bug#18751)
5
12014-11-02 Michael Albinus <michael.albinus@gmx.de> 62014-11-02 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise 8 * net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index e120aedfc01..a72a79a7797 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2061,11 +2061,15 @@ FILENAME is the source file, NEWNAME the target file.
2061KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." 2061KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
2062 (with-temp-buffer 2062 (with-temp-buffer
2063 ;; We must disable multibyte, because binary data shall not be 2063 ;; We must disable multibyte, because binary data shall not be
2064 ;; converted. 2064 ;; converted. `insert-file-contents-literally' does not support
2065 ;; file name handlers for GNU Emacs; we must create a local copy
2066 ;; therefore.
2065 (set-buffer-multibyte nil) 2067 (set-buffer-multibyte nil)
2066 (let ((coding-system-for-read 'binary) 2068 (let ((coding-system-for-read 'binary)
2067 (jka-compr-inhibit t)) 2069 (jka-compr-inhibit t)
2068 (insert-file-contents-literally filename)) 2070 (tmpfile (file-local-copy filename)))
2071 (insert-file-contents-literally (or tmpfile filename))
2072 (when tmpfile (delete-file tmpfile)))
2069 ;; We don't want the target file to be compressed, so we let-bind 2073 ;; We don't want the target file to be compressed, so we let-bind
2070 ;; `jka-compr-inhibit' to t. 2074 ;; `jka-compr-inhibit' to t.
2071 (let ((coding-system-for-write 'binary) 2075 (let ((coding-system-for-write 'binary)