diff options
author | Noam Postavsky <npostavs@gmail.com> | 2017-11-01 19:39:34 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-11-01 19:39:34 -0400 |
commit | dc0a25c2f9b44c697194bd0ec21c942125160544 (patch) | |
tree | ccd50b1ba13d8f684253b3e4cbae12f891a7c5bc /lisp | |
parent | 8453423c7c5e1886a301fb61c4077650f59e670b (diff) | |
download | emacs-dc0a25c2f9b44c697194bd0ec21c942125160544.tar.gz |
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'.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/server.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el index 4c591a5ee7c..0e225f723ea 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -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 |