1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00

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.
This commit is contained in:
Michael Albinus 2018-06-25 16:25:41 +02:00
parent f43186fe28
commit 517dc0b135

View File

@ -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.