Commit dc0a25c2 authored by Noam Postavsky's avatar Noam Postavsky

Give a more sensible message if file-attributes fails (Bug#29070)

* lisp/server.el (server-ensure-safe-dir): Don't claim the directory
is a file if we fail to get anything from `file-attributes'.
parent 8453423c
......@@ -527,8 +527,10 @@ Creates the directory if necessary and makes sure:
(w32 (eq system-type 'windows-nt))
(unsafe (cond
((not (eq t (car attrs)))
(format "it is a %s" (if (stringp (car attrs))
"symlink" "file")))
(if (null attrs) "its attributes can't be checked"
(format "it is a %s"
(if (stringp (car attrs))
"symlink" "file"))))
((and w32 (zerop uid)) ; on FAT32?
(display-warning
'server
......
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