From: Orivej Desh Date: Mon, 25 May 2015 10:25:39 +0000 (+0200) Subject: Fix IPv6 addresses in Tramp X-Git-Tag: emacs-25.0.90~1982 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93760219ce8bc689e931a190b18a9b9ed027f36d;p=emacs.git Fix IPv6 addresses in Tramp * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Add sqare brackets around host name. Copyright-paperwork-exempt: yes --- 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)