From ce5078f6fc3927eca6604b42297be8c79342a660 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Wed, 18 Jan 2017 11:50:33 +0800 Subject: [PATCH] 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 Reviewed-By: Rich Trott Reviewed-By: Brian White Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- lib/fs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index d407cf1479eac0..da67f2742cb892 100644 --- a/lib/fs.js +++ b/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') {