]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-adb.el (tramp-adb-handle-process-file): Do not raise
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 2 Nov 2014 11:22:56 +0000 (12:22 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 2 Nov 2014 11:22:56 +0000 (12:22 +0100)
an error when the command fails; the return code must indicate.
(tramp-adb-send-command-and-check): Fix docstring.

lisp/ChangeLog
lisp/net/tramp-adb.el

index 0c0f003204ca9bcab1ab8ccd208e4b532419b2db..07231507bae8ca29c78d17b7861e34c7305b8fae 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * 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  <michael.albinus@gmx.de>
 
        * net/tramp-cache.el (tramp-get-file-property)
index 88e52fe019923d22fd519e7d747255f0fde92ed5..639f07b2f1d78de6bf486acaa15cc54919e40790 100644 (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)