1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise

an error when the command fails; the return code must indicate.
(tramp-adb-send-command-and-check): Fix docstring.
This commit is contained in:
Michael Albinus 2014-11-02 12:22:56 +01:00
parent b039c2ec57
commit d228120da4
2 changed files with 16 additions and 7 deletions

View file

@ -794,11 +794,13 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
;; directory.
(condition-case nil
(progn
(setq ret 0)
(tramp-adb-barf-unless-okay
v (format "(cd %s; %s)"
(tramp-shell-quote-argument localname) command)
"")
(setq ret
(if (tramp-adb-send-command-and-check
v
(format "(cd %s; %s)"
(tramp-shell-quote-argument localname) command))
;; Set return status accordingly.
0 1))
;; We should add the output anyway.
(when outbuf
(with-current-buffer outbuf
@ -1031,8 +1033,9 @@ This happens for Android >= 4.0."
(defun tramp-adb-send-command-and-check
(vec command)
"Run COMMAND and check its exit status.
Sends `echo $?' along with the COMMAND for checking the exit status. If
COMMAND is nil, just sends `echo $?'. Returns the exit status found."
Sends `echo $?' along with the COMMAND for checking the exit
status. If COMMAND is nil, just sends `echo $?'. Returns nil if
the exit status is not equal 0, and t otherwise."
(tramp-adb-send-command
vec (if command
(format "%s; echo tramp_exit_status $?" command)