diff options
| author | Joakim Verona | 2012-12-05 15:10:13 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-12-05 15:10:13 +0100 |
| commit | 73cc695340e5d71177e31e08c45b9eadc77734dc (patch) | |
| tree | 6c7125a83ef35e3040baec83ebad51fc82c86abd | |
| parent | 001e5e5c3a82f72c0fe269701b6c6b54a629d619 (diff) | |
| parent | d5f97f62956d942b1c92802e0a632abb471359b2 (diff) | |
| download | emacs-73cc695340e5d71177e31e08c45b9eadc77734dc.tar.gz emacs-73cc695340e5d71177e31e08c45b9eadc77734dc.zip | |
auto upstream
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 30 |
2 files changed, 30 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42cd1dca308..cbc0e743183 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-12-05 Michael Albinus <michael.albinus@gmx.de> | 1 | 2012-12-05 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 2 | ||
| 3 | * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): | ||
| 4 | Check return code of copy command. | ||
| 5 | |||
| 3 | * net/tramp-adb.el (tramp-adb-sdk-dir, tramp-adb-prompt): Use | 6 | * net/tramp-adb.el (tramp-adb-sdk-dir, tramp-adb-prompt): Use |
| 4 | group `tramp'. Add version. | 7 | group `tramp'. Add version. |
| 5 | 8 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 340b7ad353d..28a06b2a647 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2379,17 +2379,41 @@ The method used must be an out-of-band method." | |||
| 2379 | ;; last longer than 60 secs. | 2379 | ;; last longer than 60 secs. |
| 2380 | (let ((p (let ((default-directory | 2380 | (let ((p (let ((default-directory |
| 2381 | (tramp-compat-temporary-file-directory))) | 2381 | (tramp-compat-temporary-file-directory))) |
| 2382 | (apply 'start-process | 2382 | (apply 'start-process-shell-command |
| 2383 | (tramp-get-connection-name v) | 2383 | (tramp-get-connection-name v) |
| 2384 | (tramp-get-connection-buffer v) | 2384 | (tramp-get-connection-buffer v) |
| 2385 | copy-program | 2385 | copy-program |
| 2386 | (append copy-args (list source target)))))) | 2386 | (append |
| 2387 | copy-args | ||
| 2388 | (list | ||
| 2389 | (shell-quote-argument source) | ||
| 2390 | (shell-quote-argument target)) | ||
| 2391 | (unless (memq system-type '(windows-nt)) | ||
| 2392 | '(";" "echo" | ||
| 2393 | "tramp_exit_status" "$?"))))))) | ||
| 2387 | (tramp-message | 2394 | (tramp-message |
| 2388 | orig-vec 6 "%s" | 2395 | orig-vec 6 "%s" |
| 2389 | (mapconcat 'identity (process-command p) " ")) | 2396 | (mapconcat 'identity (process-command p) " ")) |
| 2390 | (tramp-compat-set-process-query-on-exit-flag p nil) | 2397 | (tramp-compat-set-process-query-on-exit-flag p nil) |
| 2391 | (tramp-process-actions | 2398 | (tramp-process-actions |
| 2392 | p v nil tramp-actions-copy-out-of-band))) | 2399 | p v nil tramp-actions-copy-out-of-band) |
| 2400 | |||
| 2401 | ;; Check the return code. This does not work under | ||
| 2402 | ;; MS Windows. | ||
| 2403 | (unless (memq system-type '(windows-nt)) | ||
| 2404 | (goto-char (point-max)) | ||
| 2405 | (unless | ||
| 2406 | (re-search-backward "tramp_exit_status [0-9]+" nil t) | ||
| 2407 | (tramp-error | ||
| 2408 | orig-vec 'file-error | ||
| 2409 | "Couldn't find exit status of `%s'" (process-command p))) | ||
| 2410 | (skip-chars-forward "^ ") | ||
| 2411 | (unless (zerop (read (current-buffer))) | ||
| 2412 | (forward-line -1) | ||
| 2413 | (tramp-error | ||
| 2414 | orig-vec 'file-error | ||
| 2415 | "Error copying: `%s'" | ||
| 2416 | (buffer-substring (point-min) (point-at-eol))))))) | ||
| 2393 | 2417 | ||
| 2394 | ;; Reset the transfer process properties. | 2418 | ;; Reset the transfer process properties. |
| 2395 | (tramp-message orig-vec 6 "\n%s" (buffer-string)) | 2419 | (tramp-message orig-vec 6 "\n%s" (buffer-string)) |