emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117660: * net/tramp-sh.el (tramp-do-copy-or-rena


From: Michael Albinus
Subject: [Emacs-diffs] emacs-24 r117660: * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a
Date: Mon, 03 Nov 2014 14:29:58 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117660
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18751
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-11-03 15:29:51 +0100
message:
  * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a
  local copy of FILENAME, when it is remote.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-02 11:22:56 +0000
+++ b/lisp/ChangeLog    2014-11-03 14:29:51 +0000
@@ -1,3 +1,8 @@
+2014-11-03  Michael Albinus  <address@hidden>
+
+       * 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  <address@hidden>
 
        * net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-11-01 16:47:09 +0000
+++ b/lisp/net/tramp-sh.el      2014-11-03 14:29:51 +0000
@@ -2061,11 +2061,15 @@
 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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]