diff options
| author | Jürgen Hötzel | 2015-08-07 20:24:45 +0200 |
|---|---|---|
| committer | Michael Albinus | 2015-08-07 20:24:45 +0200 |
| commit | 35656b6fa473a4c422875a61d24ebb736c1be4e9 (patch) | |
| tree | f400db0abe89dfaf805c55bef33178a38a724549 | |
| parent | c5565ce5b00e4234339ef6a4bdea50d8b6b6aec7 (diff) | |
| download | emacs-35656b6fa473a4c422875a61d24ebb736c1be4e9.tar.gz emacs-35656b6fa473a4c422875a61d24ebb736c1be4e9.zip | |
Improve error checking in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-ls-output-name-less-p):
Improve error checking. "ls -l" on Android in Enforcing mode can
print "lstat './FILENAME failed: Permission denied".
| -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 63059218579..b81f5974cc7 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -497,12 +497,11 @@ Emacs dired can't find files." | |||
| 497 | 497 | ||
| 498 | (defun tramp-adb-ls-output-name-less-p (a b) | 498 | (defun tramp-adb-ls-output-name-less-p (a b) |
| 499 | "Sort \"ls\" output by name, ascending." | 499 | "Sort \"ls\" output by name, ascending." |
| 500 | (let (posa posb) | 500 | (if (string-match directory-listing-before-filename-regexp a) |
| 501 | (string-match directory-listing-before-filename-regexp a) | 501 | (let ((posa (match-end 0))) |
| 502 | (setq posa (match-end 0)) | 502 | (if (string-match directory-listing-before-filename-regexp b) |
| 503 | (string-match directory-listing-before-filename-regexp b) | 503 | (let ((posb (match-end 0))) |
| 504 | (setq posb (match-end 0)) | 504 | (string-lessp (substring a posa) (substring b posb))))))) |
| 505 | (string-lessp (substring a posa) (substring b posb)))) | ||
| 506 | 505 | ||
| 507 | (defun tramp-adb-handle-make-directory (dir &optional parents) | 506 | (defun tramp-adb-handle-make-directory (dir &optional parents) |
| 508 | "Like `make-directory' for Tramp files." | 507 | "Like `make-directory' for Tramp files." |