Skip to content

Commit

Permalink
fs: fchmod->fchown in promises/lchown
Browse files Browse the repository at this point in the history
This was a clear error.

chown should do chown, not chmod.

PR-URL: #20407
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jamie Davis <davisjam@vt.edu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
ChALkeR authored and MylesBorins committed May 9, 2018
1 parent eb724f0 commit eb483db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ async function lchown(path, uid, gid) {
if (O_SYMLINK !== undefined) {
const fd = await open(path,
O_WRONLY | O_SYMLINK);
return fchmod(fd, uid, gid).finally(fd.close.bind(fd));
return fchown(fd, uid, gid).finally(fd.close.bind(fd));
}
throw new ERR_METHOD_NOT_IMPLEMENTED();
}
Expand Down

0 comments on commit eb483db

Please sign in to comment.