emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 00b8c7e: Make ls-lisp.el behave like Posix hosts wh


From: Eli Zaretskii
Subject: [Emacs-diffs] master 00b8c7e: Make ls-lisp.el behave like Posix hosts when directory doesn't exist
Date: Fri, 15 Feb 2019 08:46:57 -0500 (EST)

branch: master
commit 00b8c7ef96dacaf36ec6e66356b4d100ad9b1530
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Make ls-lisp.el behave like Posix hosts when directory doesn't exist
    
    * lisp/ls-lisp.el (ls-lisp-insert-directory): For a directory
    that cannot be accessed, signal an error, like insert-directory
    does on Posix systems.  This causes files-tests.el to pass on
    MS-Windows.
---
 lisp/ls-lisp.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index c00dd29..1f2c468 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -475,9 +475,13 @@ not contain `d', so that a full listing is expected."
                       (ls-lisp-classify-file file fattr)
                     file)
                   fattr (file-attribute-size fattr)
-                                 switches time-index))
-       (message "%s: doesn't exist or is inaccessible" file)
-       (ding) (sit-for 2)))))          ; to show user the message!
+                   switches time-index))
+        ;; Emulate what we do on Posix hosts when we call access-file
+        ;; in insert-directory.
+       (signal 'file-error
+                (list "Reading directory"
+                      "Directory doesn't exist or is inaccessible"
+                      file))))))
 
 (declare-function dired-read-dir-and-switches "dired" (str))
 (declare-function dired-goto-next-file "dired" ())



reply via email to

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