From fd8b61369bfb3fbf10597c16dab7329dd93c19ef Mon Sep 17 00:00:00 2001 From: Mert Can Altin Date: Wed, 21 Jan 2026 00:21:04 +0300 Subject: [PATCH] fs: remove duplicate getValidatedPath calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61359 Reviewed-By: Gürgün Dayıoğlu Reviewed-By: Ruben Bridgewater Reviewed-By: Juan José Arboleda Reviewed-By: Xuguang Mei Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Yagiz Nizipli --- lib/fs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index b9563861ef4..0845ae0c790 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1663,7 +1663,7 @@ function statfs(path, options = { bigint: false }, callback) { callback(err, getStatFsFromBinding(stats)); }; - binding.statfs(getValidatedPath(path), options.bigint, req); + binding.statfs(path, options.bigint, req); } /** @@ -1698,7 +1698,7 @@ function lstatSync(path, options = { bigint: false, throwIfNoEntry: true }) { throw new ERR_ACCESS_DENIED('Access to this API has been restricted', 'FileSystemRead', resource); } const stats = binding.lstat( - getValidatedPath(path), + path, options.bigint, undefined, options.throwIfNoEntry,