Commit 00b8c7ef authored by Eli Zaretskii's avatar Eli Zaretskii

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
parent 4d00262a
Pipeline #776 failed with stage
in 51 minutes and 7 seconds
......@@ -475,9 +475,13 @@ not contain `d', so that a full listing is expected."
(ls-lisp-classify-file file fattr)
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"
(declare-function dired-read-dir-and-switches "dired" (str))
(declare-function dired-goto-next-file "dired" ())
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