emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 412b8da: Slightly tune file-accessible-directory-p


From: Paul Eggert
Subject: [Emacs-diffs] master 412b8da: Slightly tune file-accessible-directory-p fix
Date: Fri, 27 Jan 2017 16:58:06 +0000 (UTC)

branch: master
commit 412b8dac5277092e677b3cd57b0fd1a36893a26b
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Slightly tune file-accessible-directory-p fix
    
    * src/fileio.c (Ffile_accessible_directory_p):
    Remove unnecessary test (Bug#25419).
---
 src/fileio.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/fileio.c b/src/fileio.c
index 8e549a4..b8706e1 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2816,13 +2816,15 @@ really is a readable and searchable directory.  */)
     {
       Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname);
 
-      /* This might be a lie (e.g., the directory might not exist, or
-        be a regular file), but at least it does TRT in the "usual"
-        case of an existing directory that is not accessible by the
-        current user, and avoids reporting "Success" for a failed
-        operation.  */
-      if (!EQ (r, Qt))
-       errno = EACCES;
+      /* Set errno in case the handler failed.  EACCES might be a lie
+        (e.g., the directory might not exist, or be a regular file),
+        but at least it does TRT in the "usual" case of an existing
+        directory that is not accessible by the current user, and
+        avoids reporting "Success" for a failed operation.  Perhaps
+        someday we can fix this in a better way, by improving
+        file-accessible-directory-p's API; see Bug#25419.  */
+      errno = EACCES;
+
       return r;
     }
 



reply via email to

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