Commit 61683531 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent 4a919b1b
Pipeline #3013 passed with stage
in 57 minutes and 25 seconds
...@@ -517,7 +517,8 @@ If the \"..\" directory entry has nil attributes, the attributes ...@@ -517,7 +517,8 @@ If the \"..\" directory entry has nil attributes, the attributes
are copied from the \".\" entry, if they are non-nil. Otherwise, are copied from the \".\" entry, if they are non-nil. Otherwise,
the offending element is removed from the list, as are any the offending element is removed from the list, as are any
elements for other directory entries with nil attributes." elements for other directory entries with nil attributes."
(if (and (null (cdr (assoc ".." file-alist))) (if (and (consp (assoc ".." file-alist))
(null (cdr (assoc ".." file-alist)))
(cdr (assoc "." file-alist))) (cdr (assoc "." file-alist)))
(setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist)))) (setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist))))
(rassq-delete-all nil file-alist)) (rassq-delete-all nil file-alist))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment