Browse Source

fs: remove unused parameter for encodeRealpathResult

The third parameter `err` is not used anywhere.

PR-URL: https://github.com/nodejs/node/pull/10862
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v7.x
Jackson Tian 8 years ago
committed by Italo A. Casas
parent
commit
d047f8e8f8
  1. 4
      lib/fs.js

4
lib/fs.js

@ -1453,8 +1453,8 @@ const splitRootRe = isWindows ?
/^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/][^\\/]+)?[\\/]*/ :
/^[/]*/;
function encodeRealpathResult(result, options, err) {
if (!options || !options.encoding || options.encoding === 'utf8' || err)
function encodeRealpathResult(result, options) {
if (!options || !options.encoding || options.encoding === 'utf8')
return result;
const asBuffer = Buffer.from(result);
if (options.encoding === 'buffer') {

Loading…
Cancel
Save