From: Noam Postavsky Date: Wed, 1 Nov 2017 23:39:34 +0000 (-0400) Subject: Give a more sensible message if file-attributes fails (Bug#29070) X-Git-Tag: emacs-26.0.91~418 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc0a25c2f9b44c697194bd0ec21c942125160544;p=emacs.git 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'. --- 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