emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 dc0a25c: Give a more sensible message if file-att


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 dc0a25c: Give a more sensible message if file-attributes fails (Bug#29070)
Date: Wed, 1 Nov 2017 19:44:26 -0400 (EDT)

branch: emacs-26
commit dc0a25c2f9b44c697194bd0ec21c942125160544
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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'.
---
 lisp/server.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/server.el b/lisp/server.el
index 4c591a5..0e225f7 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]