fs: remove duplicate getValidatedPath calls

PR-URL: https://github.com/nodejs/node/pull/61359
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
Mert Can Altin authored and Antoine du Hamel committed 2026-01-27 22:52:30 +01:00
1 parent e2481c5c6e
commit fd8b61369b
1 file changed
+2 -2
+2 -2
View File
@@ -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,