aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-11-17 18:52:48 +0200
committerEli Zaretskii2012-11-17 18:52:48 +0200
commit6ad30855c02908fdd99d9b11943719e185e65ee3 (patch)
tree02e63746c2554b51bf2bdd043b4f2987a148108b /src
parent22bae83fa8c432780fe20202a660aa8c84f3087a (diff)
downloademacs-6ad30855c02908fdd99d9b11943719e185e65ee3.tar.gz
emacs-6ad30855c02908fdd99d9b11943719e185e65ee3.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/w32.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 45d48ba41cc..df8bf602afe 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12012-11-17 Eli Zaretskii <eliz@gnu.org> 12012-11-17 Eli Zaretskii <eliz@gnu.org>
2 2
3 * w32.c (faccessat): Pretend that directories have the execute bit
4 set. Emacs expects that, e.g., in files.el:cd-absolute.
5
3 * w32proc.c (create_child): Don't clip the PID of the child 6 * w32proc.c (create_child): Don't clip the PID of the child
4 process to fit into an Emacs integer, as this is no longer a 7 process to fit into an Emacs integer, as this is no longer a
5 restriction. 8 restriction.
diff --git a/src/w32.c b/src/w32.c
index eb07e13a2fb..46433626802 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -2762,7 +2762,8 @@ faccessat (int dirfd, const char * path, int mode, int flags)
2762 } 2762 }
2763 return -1; 2763 return -1;
2764 } 2764 }
2765 if ((mode & X_OK) != 0 && !is_exec (path)) 2765 if ((mode & X_OK) != 0
2766 && !(is_exec (path) || (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0))
2766 { 2767 {
2767 errno = EACCES; 2768 errno = EACCES;
2768 return -1; 2769 return -1;