]> code.delx.au - gnu-emacs/commitdiff
* net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 19 Nov 2012 15:25:10 +0000 (16:25 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 19 Nov 2012 15:25:10 +0000 (16:25 +0100)
are remote, check out-of-band property for both.

lisp/ChangeLog
lisp/net/tramp-sh.el

index 85e762497e43fe685ced80fdb8556e960efc7ec9..8447be48e14620c7c4b07c592eb32edd7ceecac2 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-19  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
+       are remote, check out-of-band property for both.
+
 2012-11-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * window.el (switch-to-buffer): Re-add the warning that was lost in the
index 059e1e63c775133c6b2f83495c3737b9870dd6ca..07da0b3dc16722f92d7e6e73f41824a1d45c1ae6 100644 (file)
@@ -1270,9 +1270,10 @@ target of the symlink differ."
          res-uid
          ;; 3. File gid.
          res-gid
-         ;; 4. Last access time, as a list of integers.  Normally this would be
-         ;; in the same format as `current-time', but the subseconds part is not
-         ;; currently implemented, and (0 0) denotes an unknown time.
+         ;; 4. Last access time, as a list of integers.  Normally this
+         ;; would be in the same format as `current-time', but the
+         ;; subseconds part is not currently implemented, and (0 0)
+         ;; denotes an unknown time.
          ;; 5. Last modification time, likewise.
          ;; 6. Last status change time, likewise.
          '(0 0) '(0 0) '(0 0)          ;CCC how to find out?
@@ -1980,6 +1981,7 @@ file names."
     (error "Unknown operation `%s', must be `copy' or `rename'" op))
   (let ((t1 (tramp-tramp-file-p filename))
        (t2 (tramp-tramp-file-p newname))
+       (length (nth 7 (file-attributes (file-truename filename))))
        (context (and preserve-selinux-context
                      (apply 'file-selinux-context (list filename))))
        pr tm)
@@ -2009,8 +2011,9 @@ file names."
                 ok-if-already-exists keep-date preserve-uid-gid))
 
               ;; Try out-of-band operation.
-              ((tramp-method-out-of-band-p
-                v1 (nth 7 (file-attributes (file-truename filename))))
+              ((and
+                (tramp-method-out-of-band-p v1 length)
+                (tramp-method-out-of-band-p v2 length))
                (tramp-do-copy-or-rename-file-out-of-band
                 op filename newname keep-date))
 
@@ -2038,8 +2041,7 @@ file names."
 
           ;; If the Tramp file has an out-of-band method, the
           ;; corresponding copy-program can be invoked.
-          ((tramp-method-out-of-band-p
-            v (nth 7 (file-attributes (file-truename filename))))
+          ((tramp-method-out-of-band-p v length)
            (tramp-do-copy-or-rename-file-out-of-band
             op filename newname keep-date))