diff options
| -rw-r--r-- | lisp/net/tramp-adb.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 3f216ba403a..8ad7c271b4f 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -1114,9 +1114,7 @@ error and non-nil on success." | |||
| 1114 | 1114 | ||
| 1115 | (defun tramp-adb-send-command (vec command &optional neveropen nooutput) | 1115 | (defun tramp-adb-send-command (vec command &optional neveropen nooutput) |
| 1116 | "Send the COMMAND to connection VEC." | 1116 | "Send the COMMAND to connection VEC." |
| 1117 | (if (and (equal (tramp-file-name-method vec) | 1117 | (if (string-match-p (rx multibyte) command) |
| 1118 | tramp-androidsu-method) | ||
| 1119 | (string-match-p (rx multibyte) command)) | ||
| 1120 | ;; Multibyte codepoints with four bytes are not supported at | 1118 | ;; Multibyte codepoints with four bytes are not supported at |
| 1121 | ;; least by toybox. | 1119 | ;; least by toybox. |
| 1122 | 1120 | ||
| @@ -1148,8 +1146,8 @@ error and non-nil on success." | |||
| 1148 | (while (search-forward-regexp (rx (+ "\r") eol) nil t) | 1146 | (while (search-forward-regexp (rx (+ "\r") eol) nil t) |
| 1149 | (replace-match "" nil nil))))))) | 1147 | (replace-match "" nil nil))))))) |
| 1150 | 1148 | ||
| 1151 | (defun tramp-adb-send-command-and-check (vec command &optional exit-status | 1149 | (defun tramp-adb-send-command-and-check |
| 1152 | command-augmented-p) | 1150 | (vec command &optional exit-status command-augmented-p) |
| 1153 | "Run COMMAND and check its exit status. | 1151 | "Run COMMAND and check its exit status. |
| 1154 | Sends `echo $?' along with the COMMAND for checking the exit | 1152 | Sends `echo $?' along with the COMMAND for checking the exit |
| 1155 | status. If COMMAND is nil, just sends `echo $?'. Returns nil if | 1153 | status. If COMMAND is nil, just sends `echo $?'. Returns nil if |
| @@ -1162,7 +1160,8 @@ Optional argument EXIT-STATUS, if non-nil, triggers the return of | |||
| 1162 | the exit status." | 1160 | the exit status." |
| 1163 | (tramp-adb-send-command | 1161 | (tramp-adb-send-command |
| 1164 | vec (if command | 1162 | vec (if command |
| 1165 | (if command-augmented-p command | 1163 | (if command-augmented-p |
| 1164 | command | ||
| 1166 | (format "%s; echo tramp_exit_status $?" command)) | 1165 | (format "%s; echo tramp_exit_status $?" command)) |
| 1167 | "echo tramp_exit_status $?")) | 1166 | "echo tramp_exit_status $?")) |
| 1168 | (with-current-buffer (tramp-get-connection-buffer vec) | 1167 | (with-current-buffer (tramp-get-connection-buffer vec) |