emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111110: * tramp-sh.el (tramp-do-copy


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111110: * tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Check error
Date: Wed, 05 Dec 2012 16:50:32 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111110
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Wed 2012-12-05 16:50:32 +0100
message:
  * tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Check error
  code also on MS-Windows machines.
modified:
  lisp/net/tramp-sh.el
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2012-12-05 14:06:06 +0000
+++ b/lisp/net/tramp-sh.el      2012-12-05 15:50:32 +0000
@@ -2387,10 +2387,9 @@
                                   copy-args
                                   (list
                                    (shell-quote-argument source)
-                                   (shell-quote-argument target))
-                                  (unless (memq system-type '(windows-nt))
-                                    '(";" "echo"
-                                      "tramp_exit_status" "$?")))))))
+                                   (shell-quote-argument target)
+                                   "&&" "echo" "tramp_exit_status" "0"
+                                   "||" "echo" "tramp_exit_status" "1"))))))
                  (tramp-message
                   orig-vec 6 "%s"
                   (mapconcat 'identity (process-command p) " "))
@@ -2398,22 +2397,20 @@
                  (tramp-process-actions
                   p v nil tramp-actions-copy-out-of-band)
 
-                 ;; Check the return code.  This does not work under
-                 ;; MS Windows.
-                 (unless (memq system-type '(windows-nt))
-                   (goto-char (point-max))
-                   (unless
-                       (re-search-backward "tramp_exit_status [0-9]+" nil t)
-                     (tramp-error
-                      orig-vec 'file-error
-                      "Couldn't find exit status of `%s'" (process-command p)))
-                   (skip-chars-forward "^ ")
-                   (unless (zerop (read (current-buffer)))
-                     (forward-line -1)
-                     (tramp-error
-                      orig-vec 'file-error
-                      "Error copying: `%s'"
-                      (buffer-substring (point-min) (point-at-eol)))))))
+                 ;; Check the return code.
+                 (goto-char (point-max))
+                 (unless
+                     (re-search-backward "tramp_exit_status [0-9]+" nil t)
+                   (tramp-error
+                    orig-vec 'file-error
+                    "Couldn't find exit status of `%s'" (process-command p)))
+                 (skip-chars-forward "^ ")
+                 (unless (zerop (read (current-buffer)))
+                   (forward-line -1)
+                   (tramp-error
+                    orig-vec 'file-error
+                    "Error copying: `%s'"
+                    (buffer-substring (point-min) (point-at-eol))))))
 
            ;; Reset the transfer process properties.
            (tramp-message orig-vec 6 "\n%s" (buffer-string))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]