From 606184fae52a2549d92a8fa184ea84dc427337ae 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 1c65c01c939..7189c4f461a 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1648,7 +1648,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); } /** @@ -1683,7 +1683,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,