diff options
Diffstat (limited to 'ports/unix/guts/fchmod.c')
-rw-r--r-- | ports/unix/guts/fchmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/unix/guts/fchmod.c b/ports/unix/guts/fchmod.c index 40f62ba..7c6a6ad 100644 --- a/ports/unix/guts/fchmod.c +++ b/ports/unix/guts/fchmod.c @@ -16,7 +16,7 @@ } buf.st_mode = (buf.st_mode & ~07777) | (mode & 07777); msg = pseudo_client_op_plain(OP_FCHMOD, 0, fd, -1, 0, &buf); - real_fchmod(fd, PSEUDO_FS_MODE(mode)); + real_fchmod(fd, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode))); if (msg && msg->result != RESULT_SUCCEED) { errno = EPERM; rc = -1; |