aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-01-27 08:56:34 -0800
committerPaul Eggert2017-01-27 08:58:02 -0800
commit412b8dac5277092e677b3cd57b0fd1a36893a26b (patch)
tree8b64815d5652e16e6029834c32358456e3a902b3 /src
parent21d661d5f7e2dd59b6d427f94faf5cc281ecf719 (diff)
downloademacs-412b8dac5277092e677b3cd57b0fd1a36893a26b.tar.gz
emacs-412b8dac5277092e677b3cd57b0fd1a36893a26b.zip
Slightly tune file-accessible-directory-p fix
* src/fileio.c (Ffile_accessible_directory_p): Remove unnecessary test (Bug#25419).
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 8e549a44855..b8706e1e893 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2816,13 +2816,15 @@ really is a readable and searchable directory. */)
2816 { 2816 {
2817 Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname); 2817 Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname);
2818 2818
2819 /* This might be a lie (e.g., the directory might not exist, or 2819 /* Set errno in case the handler failed. EACCES might be a lie
2820 be a regular file), but at least it does TRT in the "usual" 2820 (e.g., the directory might not exist, or be a regular file),
2821 case of an existing directory that is not accessible by the 2821 but at least it does TRT in the "usual" case of an existing
2822 current user, and avoids reporting "Success" for a failed 2822 directory that is not accessible by the current user, and
2823 operation. */ 2823 avoids reporting "Success" for a failed operation. Perhaps
2824 if (!EQ (r, Qt)) 2824 someday we can fix this in a better way, by improving
2825 errno = EACCES; 2825 file-accessible-directory-p's API; see Bug#25419. */
2826 errno = EACCES;
2827
2826 return r; 2828 return r;
2827 } 2829 }
2828 2830