aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-03-09 12:04:27 +0100
committerMichael Albinus2011-03-09 12:04:27 +0100
commitee545c35d2e83306d50ec78a8d9173ab9011bce5 (patch)
tree7eb714b707eef13b9cfecb84cf8d94ebc12bd437
parentc47971d7a31d28dc49a39cccc2523d1e3ed08b10 (diff)
downloademacs-ee545c35d2e83306d50ec78a8d9173ab9011bce5.tar.gz
emacs-ee545c35d2e83306d50ec78a8d9173ab9011bce5.zip
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do
not use `tramp-file-name-port', because this returns also `tramp-default-port'.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp-sh.el18
2 files changed, 17 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 251547b617d..df4834a27c6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-03-09 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do
4 not use `tramp-file-name-port', because this returns also
5 `tramp-default-port'.
6
12011-03-09 Deniz Dogan <deniz.a.m.dogan@gmail.com> 72011-03-09 Deniz Dogan <deniz.a.m.dogan@gmail.com>
2 8
3 * net/rcirc.el (rcirc-handler-001): Remove useless 9 * net/rcirc.el (rcirc-handler-001): Remove useless
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 63a4c19eccf..ec75ea78fe1 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2251,11 +2251,15 @@ The method used must be an out-of-band method."
2251 'identity) 2251 'identity)
2252 (if t2 (tramp-make-copy-program-file-name v) newname))) 2252 (if t2 (tramp-make-copy-program-file-name v) newname)))
2253 2253
2254 ;; Check for port number. Until now, there's no need for handling 2254 ;; Check for host and port number. We cannot use
2255 ;; like method, user, host. 2255 ;; `tramp-file-name-port', because this returns also
2256 (setq host (tramp-file-name-real-host v) 2256 ;; `tramp-default-port', which might clash with settings in
2257 port (tramp-file-name-port v) 2257 ;; "~/.ssh/config".
2258 port (or (and port (number-to-string port)) "")) 2258 (setq host (tramp-file-name-host v)
2259 port "")
2260 (when (string-match tramp-host-with-port-regexp host)
2261 (setq host (string-to-number (match-string 1 host))
2262 port (string-to-number (match-string 2 host))))
2259 2263
2260 ;; Compose copy command. 2264 ;; Compose copy command.
2261 (setq spec (format-spec-make 2265 (setq spec (format-spec-make
@@ -2270,7 +2274,7 @@ The method used must be an out-of-band method."
2270 copy-args 2274 copy-args
2271 (delete 2275 (delete
2272 ;; " " has either been a replacement of "%k" (when 2276 ;; " " has either been a replacement of "%k" (when
2273 ;; keep-date argument is non-nil), or a replacemtent 2277 ;; keep-date argument is non-nil), or a replacement
2274 ;; for the whole keep-date sublist. 2278 ;; for the whole keep-date sublist.
2275 " " 2279 " "
2276 (dolist 2280 (dolist
@@ -2281,7 +2285,7 @@ The method used must be an out-of-band method."
2281 (append 2285 (append
2282 copy-args 2286 copy-args
2283 (let ((y (mapcar (lambda (z) (format-spec z spec)) x))) 2287 (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
2284 (if (zerop (length (car y))) '(" ") y)))))) 2288 (if (member "" y) '(" ") y))))))
2285 copy-env 2289 copy-env
2286 (delq 2290 (delq
2287 nil 2291 nil