diff options
Diffstat (limited to 'ports/unix/guts/fchmodat.c')
-rw-r--r-- | ports/unix/guts/fchmodat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/unix/guts/fchmodat.c b/ports/unix/guts/fchmodat.c index 531345d..5095c77 100644 --- a/ports/unix/guts/fchmodat.c +++ b/ports/unix/guts/fchmodat.c @@ -47,9 +47,9 @@ #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS /* note: if path was a symlink, and AT_NOFOLLOW_SYMLINKS was * specified, we already bailed previously. */ - real_chmod(path, PSEUDO_FS_MODE(mode)); + real_chmod(path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode))); #else - real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode), flags); + real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags); #endif /* we ignore a failure from underlying fchmod, because pseudo * may believe you are permitted to change modes that the filesystem |