From: Michael Albinus Date: Sun, 2 Nov 2014 11:22:56 +0000 (+0100) Subject: * net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise X-Git-Tag: emacs-24.4.90~279 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d228120da42885de7d64c7878bd21b2e04abd356;p=emacs.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c0f003204c..07231507bae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-02 Michael Albinus + + * 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. + 2014-11-01 Michael Albinus * net/tramp-cache.el (tramp-get-file-property) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 88e52fe0199..639f07b2f1d 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -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)