diff options
| author | Eli Zaretskii | 2019-08-31 09:54:05 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-08-31 09:54:05 +0300 |
| commit | 616835312e950fdeb38e8d7cbfcc6f581866ae36 (patch) | |
| tree | 63b93263dc172a82384a76b55ae5868443173d5a | |
| parent | 4a919b1bbc00c8084aea2a4e8196d2b38e657946 (diff) | |
| download | emacs-616835312e950fdeb38e8d7cbfcc6f581866ae36.tar.gz emacs-616835312e950fdeb38e8d7cbfcc6f581866ae36.zip | |
Avoid signaling errors from ls-lisp--insert-directory on macOS
* lisp/ls-lisp.el (ls-lisp-sanitize): Don't assume the
directory entries for ".." and "." will either both be present
or both absent. (Bug#37236)
| -rw-r--r-- | lisp/ls-lisp.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index e802c2408f7..8491181bbe1 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el | |||
| @@ -517,7 +517,8 @@ If the \"..\" directory entry has nil attributes, the attributes | |||
| 517 | are copied from the \".\" entry, if they are non-nil. Otherwise, | 517 | are copied from the \".\" entry, if they are non-nil. Otherwise, |
| 518 | the offending element is removed from the list, as are any | 518 | the offending element is removed from the list, as are any |
| 519 | elements for other directory entries with nil attributes." | 519 | elements for other directory entries with nil attributes." |
| 520 | (if (and (null (cdr (assoc ".." file-alist))) | 520 | (if (and (consp (assoc ".." file-alist)) |
| 521 | (null (cdr (assoc ".." file-alist))) | ||
| 521 | (cdr (assoc "." file-alist))) | 522 | (cdr (assoc "." file-alist))) |
| 522 | (setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist)))) | 523 | (setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist)))) |
| 523 | (rassq-delete-all nil file-alist)) | 524 | (rassq-delete-all nil file-alist)) |