diff options
| author | Paul Eggert | 2019-10-06 09:53:53 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-10-06 09:54:25 -0700 |
| commit | 8ad41af3a1a651e11c270b9bccc838aed5d0e0e7 (patch) | |
| tree | a4ed7d4257347725431e03349b71333aedb815db /src | |
| parent | 9d829b8be5b86668d5165b9d0c0cdc392b558dd3 (diff) | |
| download | emacs-8ad41af3a1a651e11c270b9bccc838aed5d0e0e7.tar.gz emacs-8ad41af3a1a651e11c270b9bccc838aed5d0e0e7.zip | |
Port file-acl errno checking to non-GNU
Problem reported privately for FreeBSD 12 by Ashish Shukla.
* src/fileio.c (Ffile_acl): Treat EINVAL etc. like ENOTSUP if
acl_get_file fails, to port to FreeBSD 12 and other non-GNU
platforms.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 45186d69401..781a71bcf35 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3248,7 +3248,7 @@ Return nil if file does not exist. */) | |||
| 3248 | acl_t acl = acl_get_file (SSDATA (ENCODE_FILE (absname)), ACL_TYPE_EXTENDED); | 3248 | acl_t acl = acl_get_file (SSDATA (ENCODE_FILE (absname)), ACL_TYPE_EXTENDED); |
| 3249 | if (acl == NULL) | 3249 | if (acl == NULL) |
| 3250 | { | 3250 | { |
| 3251 | if (errno == ENOENT || errno == ENOTDIR || errno == ENOTSUP) | 3251 | if (errno == ENOENT || errno == ENOTDIR || acl_errno_valid (errno)) |
| 3252 | return Qnil; | 3252 | return Qnil; |
| 3253 | report_file_error ("Getting ACLs", absname); | 3253 | report_file_error ("Getting ACLs", absname); |
| 3254 | } | 3254 | } |