diff lisp/net/tramp-sh.el @ 111647:7d109d8678c8

Sync with Tramp 2.2.0. * net/tramp.el (tramp-handle-insert-file-contents): Don't use `file-remote-p' (due to compatibility). * net/tramp-sh.el (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band): Use `ignore-errors'. * net/trampver.el: Update release number.
author Michael Albinus <michael.albinus@gmx.de>
date Sat, 20 Nov 2010 14:12:27 +0100
parents 49c1b16ca6b1
children 8e746f396237
line wrap: on
line diff
--- a/lisp/net/tramp-sh.el	Sat Nov 20 13:52:09 2010 +0200
+++ b/lisp/net/tramp-sh.el	Sat Nov 20 14:12:27 2010 +0100
@@ -106,7 +106,8 @@
 ;;;###tramp-autoload
 (add-to-list
  'tramp-methods
- '("scp"   (tramp-login-program        "ssh")
+ '("scp"
+   (tramp-login-program        "ssh")
    (tramp-login-args           (("-l" "%u") ("-p" "%p")	("-e" "none") ("%h")))
    (tramp-async-args           (("-q")))
    (tramp-remote-sh            "/bin/sh")
@@ -2166,16 +2167,13 @@
 		       (list tmpfile localname2 ok-if-already-exists)))))
 
 		;; Save exit.
-		(condition-case nil
-		    (delete-file tmpfile)
-		  (error)))))))))
+		(ignore-errors (delete-file tmpfile)))))))))
 
       ;; Set the time and mode. Mask possible errors.
-      (condition-case nil
+      (ignore-errors
 	  (when keep-date
 	    (set-file-times newname file-times)
-	    (set-file-modes newname file-modes))
-	(error)))))
+	    (set-file-modes newname file-modes))))))
 
 (defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)
   "Invoke rcp program to copy.
@@ -2203,12 +2201,11 @@
 		  (tramp-do-copy-or-rename-file-out-of-band
 		   'rename tmpfile newname keep-date))
 	      ;; Save exit.
-	      (condition-case nil
-		  (if dir-flag
-		      (tramp-compat-delete-directory
-		       (expand-file-name ".." tmpfile) 'recursive)
-		    (delete-file tmpfile))
-		(error))))
+	      (ignore-errors
+		(if dir-flag
+		    (tramp-compat-delete-directory
+		     (expand-file-name ".." tmpfile) 'recursive)
+		  (delete-file tmpfile)))))
 
 	;; Expand hops.  Might be necessary for gateway methods.
 	(setq v (car (tramp-compute-multi-hops v)))
@@ -5039,6 +5036,5 @@
 ;;   rsync.
 ;; * Try telnet+curl as new method.  It might be useful for busybox,
 ;;   without built-in uuencode/uudecode.
-;; * Try ssh+netcat as out-of-band method.
 
 ;;; tramp-sh.el ends here