]> git.eshelyaron.com Git - emacs.git/commitdiff
Give a more sensible message if file-attributes fails (Bug#29070)
authorNoam Postavsky <npostavs@gmail.com>
Wed, 1 Nov 2017 23:39:34 +0000 (19:39 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 1 Nov 2017 23:39:34 +0000 (19:39 -0400)
* lisp/server.el (server-ensure-safe-dir): Don't claim the directory
is a file if we fail to get anything from `file-attributes'.

lisp/server.el

index 4c591a5ee7ca20597bc7db768a54a6f39ceabc54..0e225f723ea2155c02e2b015e776aa1e098629a7 100644 (file)
@@ -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