mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
e2481c5c6e
commit
fd8b61369b
1 file changed
+2
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user