Commit 6ad30855 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix MS-Windows emulation of 'faccessat' wrt directories.

 src/w32.c (faccessat): Pretend that directories have the execute bit
 set.  Emacs expects that, e.g., in files.el:cd-absolute.
parent 22bae83f
2012-11-17 Eli Zaretskii <eliz@gnu.org>
 
* w32.c (faccessat): Pretend that directories have the execute bit
set. Emacs expects that, e.g., in files.el:cd-absolute.
* w32proc.c (create_child): Don't clip the PID of the child
process to fit into an Emacs integer, as this is no longer a
restriction.
......
......@@ -2762,7 +2762,8 @@ faccessat (int dirfd, const char * path, int mode, int flags)
}
return -1;
}
if ((mode & X_OK) != 0 && !is_exec (path))
if ((mode & X_OK) != 0
&& !(is_exec (path) || (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0))
{
errno = EACCES;
return -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment