emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6168353: Avoid signaling errors from ls-lisp--inser


From: Eli Zaretskii
Subject: [Emacs-diffs] master 6168353: Avoid signaling errors from ls-lisp--insert-directory on macOS
Date: Sat, 31 Aug 2019 02:55:09 -0400 (EDT)

branch: master
commit 616835312e950fdeb38e8d7cbfcc6f581866ae36
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/ls-lisp.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index e802c24..8491181 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -517,7 +517,8 @@ If the \"..\" directory entry has nil attributes, the 
attributes
 are copied from the \".\" entry, if they are non-nil.  Otherwise,
 the offending element is removed from the list, as are any
 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)))
       (setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist))))
   (rassq-delete-all nil file-alist))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]