diff options
Diffstat (limited to 'lisp/net/tramp-sh.el')
-rw-r--r-- | lisp/net/tramp-sh.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 55ac778858c..265e7995378 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5125,12 +5125,14 @@ Return ATTR." "")) (defun tramp-make-copy-program-file-name (vec) - "Create a file name suitable to be passed to `scp' or `nc' and workalikes." + "Create a file name suitable for `scp', `pscp', or `nc' and workalikes." (let ((method (tramp-file-name-method vec)) (user (tramp-file-name-user vec)) (host (tramp-file-name-real-host vec)) (localname (tramp-shell-quote-argument (tramp-file-name-localname vec)))) + (when (string-match tramp-ipv6-regexp host) + (setq host (format "[%s]" host))) (cond ((tramp-get-method-parameter method 'tramp-remote-copy-program) localname) |