diff options
Diffstat (limited to 'winsup/cygwin/fhandler')
-rw-r--r-- | winsup/cygwin/fhandler/disk_file.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc index 6eb466e9c..15dc24ffe 100644 --- a/winsup/cygwin/fhandler/disk_file.cc +++ b/winsup/cygwin/fhandler/disk_file.cc @@ -764,11 +764,12 @@ fhandler_disk_file::fchmod (mode_t mode) aclent_t *aclp; bool standard_acl = false; int nentries, idx; + mode_t attr = pc.isdir () ? S_IFDIR : 0; if (!get_file_sd (get_handle (), pc, sd, false)) { aclp = (aclent_t *) tp.c_get (); - if ((nentries = get_posix_access (sd, NULL, &uid, &gid, + if ((nentries = get_posix_access (sd, &attr, &uid, &gid, aclp, MAX_ACL_ENTRIES, &standard_acl)) >= 0) { |