changeset 100933:cdbc9da35459

*** empty log message ***
author Michael Albinus <michael.albinus@gmx.de>
date Tue, 06 Jan 2009 07:56:42 +0000
parents cbd4fb4358e5
children ba087903e9ba
files lisp/net/tramp.el
diffstat 1 files changed, 45 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp.el	Tue Jan 06 07:52:49 2009 +0000
+++ b/lisp/net/tramp.el	Tue Jan 06 07:56:42 2009 +0000
@@ -3259,52 +3259,53 @@
 
 	   ;; We need a temporary file in between.
 	   (t
-	    (condition-case err
-		;; Create the temporary file.
-		(let ((tmpfile (tramp-compat-make-temp-file localname1)))
-		  (cond
-		   (t1
-		    (tramp-send-command
-		     v (format
-			"%s %s %s" cmd
-			(tramp-shell-quote-argument localname1)
-			(tramp-shell-quote-argument tmpfile)))
-		    ;; We must change the ownership as remote user.
-		    (tramp-set-file-uid-gid
-		     (concat prefix tmpfile)
-		     (tramp-get-local-uid 'integer)
-		     (tramp-get-local-gid 'integer)))
-		   (t2
-		    (if (eq op 'copy)
-			(tramp-compat-copy-file
-			 localname1 tmpfile ok-if-already-exists
-			 keep-date preserve-uid-gid)
+	    ;; Create the temporary file.
+	    (let ((tmpfile (tramp-compat-make-temp-file localname1)))
+	      (condition-case err
+		  (progn
+		    (cond
+		     (t1
+		      (tramp-send-command
+		       v (format
+			  "%s %s %s" cmd
+			  (tramp-shell-quote-argument localname1)
+			  (tramp-shell-quote-argument tmpfile)))
+		      ;; We must change the ownership as remote user.
+		      (tramp-set-file-uid-gid
+		       (concat prefix tmpfile)
+		       (tramp-get-local-uid 'integer)
+		       (tramp-get-local-gid 'integer)))
+		     (t2
+		      (if (eq op 'copy)
+			  (tramp-compat-copy-file
+			   localname1 tmpfile ok-if-already-exists
+			   keep-date preserve-uid-gid)
+			(tramp-run-real-handler
+			 'rename-file
+			 (list localname1 tmpfile ok-if-already-exists)))
+		      ;; We must change the ownership as local user.
+		      (tramp-set-file-uid-gid
+		       tmpfile
+		       (tramp-get-remote-uid v 'integer)
+		       (tramp-get-remote-gid v 'integer))))
+
+		    ;; Move the temporary file to its destination.
+		    (cond
+		     (t2
+		      (tramp-send-command
+		       v (format
+			  "mv -f %s %s"
+			  (tramp-shell-quote-argument tmpfile)
+			  (tramp-shell-quote-argument localname2))))
+		     (t1
 		      (tramp-run-real-handler
 		       'rename-file
-		       (list localname1 tmpfile ok-if-already-exists)))
-		    ;; We must change the ownership as local user.
-		    (tramp-set-file-uid-gid
-		     tmpfile
-		     (tramp-get-remote-uid v 'integer)
-		     (tramp-get-remote-gid v 'integer))))
-
-		  ;; Move the temporary file to its destination.
-		  (cond
-		   (t2
-		    (tramp-send-command
-		     v (format
-			"mv -f %s %s"
-			(tramp-shell-quote-argument tmpfile)
-			(tramp-shell-quote-argument localname2))))
-		   (t1
-		    (tramp-run-real-handler
-		     'rename-file
-		     (list tmpfile localname2 ok-if-already-exists)))))
-
-	      ;; Error handling.
-	      ((error quit)
-	       (delete-file tmpfile)
-	       (signal (car err) (cdr err)))))))))
+		       (list tmpfile localname2 ok-if-already-exists)))))
+
+		;; Error handling.
+		((error quit)
+		 (delete-file tmpfile)
+		 (signal (car err) (cdr err))))))))))
 
       ;; Set the time and mode. Mask possible errors.
       ;; Won't be applied for 'rename.