emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 517dc0b 1/2: Fix last change in tramp-sh.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs-26 517dc0b 1/2: Fix last change in tramp-sh.el
Date: Mon, 25 Jun 2018 14:40:45 -0400 (EDT)

branch: emacs-26
commit 517dc0b13554ec969222404a6d00b03853e1cb2a
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix last change in tramp-sh.el
    
    * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
    Use "-R" rather than "-r" for recursive copy of directories.
---
 lisp/net/tramp-sh.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 3e99ab5..1a31596 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2189,8 +2189,8 @@ the uid and gid from FILENAME."
                     (file-attributes filename)))
        (file-modes (tramp-default-file-modes filename)))
     (with-parsed-tramp-file-name (if t1 filename newname) nil
-      (let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -r -p")
-                       ((eq op 'copy) "cp -f -r")
+      (let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -p")
+                       ((eq op 'copy) "cp -f")
                        ((eq op 'rename) "mv -f")
                        (t (tramp-error
                            v 'file-error
@@ -2200,6 +2200,8 @@ the uid and gid from FILENAME."
             (localname2 (if t2 (file-remote-p newname 'localname) newname))
             (prefix (file-remote-p (if t1 filename newname)))
              cmd-result)
+       (when (and (eq op 'copy) (file-directory-p filename))
+         (setq cmd (concat cmd " -R")))
 
        (cond
         ;; Both files are on a remote host, with same user.



reply via email to

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