summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 5cf108bfa3b..29f7d5c02d4 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1332,7 +1332,12 @@ Returns t if successful."
(while path-dirs
(setq dir (file-name-as-directory (comint-directory (or (car path-dirs) ".")))
comps-in-dir (and (file-accessible-directory-p dir)
- (file-name-all-completions filenondir dir)))
+ (condition-case nil
+ (file-name-all-completions filenondir dir)
+ ;; Systems such as Android sometimes
+ ;; put inaccessible directories in
+ ;; PATH.
+ (permission-denied nil))))
;; Go thru each completion found, to see whether it should be used.
(while comps-in-dir
(setq file (car comps-in-dir)