diff options
| author | Eli Zaretskii | 2012-11-17 18:52:48 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-17 18:52:48 +0200 |
| commit | 6ad30855c02908fdd99d9b11943719e185e65ee3 (patch) | |
| tree | 02e63746c2554b51bf2bdd043b4f2987a148108b /src | |
| parent | 22bae83fa8c432780fe20202a660aa8c84f3087a (diff) | |
| download | emacs-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/ChangeLog | 3 | ||||
| -rw-r--r-- | src/w32.c | 3 |
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 @@ | |||
| 1 | 2012-11-17 Eli Zaretskii <eliz@gnu.org> | 1 | 2012-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. |
| @@ -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; |