emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 7f8e742 1/2: Fix an error in Tramp for rsync


From: Michael Albinus
Subject: [Emacs-diffs] master 7f8e742 1/2: Fix an error in Tramp for rsync
Date: Thu, 7 Jul 2016 16:51:18 +0000 (UTC)

branch: master
commit 7f8e742833e058fa41c273ff35351b02b6e8d42b
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix an error in Tramp for rsync
    
    * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
    Make it work for "rsync".
    (tramp-make-copy-program-file-name): Apply `directory-file-name'.
---
 lisp/net/tramp-sh.el |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 606572b..430c1c1 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2375,19 +2375,17 @@ The method used must be an out-of-band method."
        (aset v 3 localname)
 
        ;; Check which ones of source and target are Tramp files.
-       (setq source (if t1
-                        (tramp-make-copy-program-file-name v)
-                      (shell-quote-argument filename))
-             target (funcall
+       (setq source (funcall
                      (if (and (file-directory-p filename)
-                              (string-equal
-                               (file-name-nondirectory filename)
-                               (file-name-nondirectory newname)))
-                         'file-name-directory
+                              (not (file-exists-p newname)))
+                         'file-name-as-directory
                        'identity)
-                     (if t2
+                     (if t1
                          (tramp-make-copy-program-file-name v)
-                       (shell-quote-argument newname))))
+                       (shell-quote-argument filename)))
+             target (if t2
+                        (tramp-make-copy-program-file-name v)
+                      (shell-quote-argument newname)))
 
        ;; Check for host and port number.  We cannot use
        ;; `tramp-file-name-port', because this returns also
@@ -5102,7 +5100,7 @@ Return ATTR."
   (let ((method (tramp-file-name-method vec))
        (user (tramp-file-name-user vec))
        (host (tramp-file-name-real-host vec))
-       (localname (tramp-file-name-localname vec)))
+       (localname (directory-file-name (tramp-file-name-localname vec))))
     (when (string-match tramp-ipv6-regexp host)
       (setq host (format "[%s]" host)))
     (unless (string-match "ftp$" method)



reply via email to

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