From 5d6aa854d6dd051ac5eec6f1b9c8799ccb622a19 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Sun, 24 Sep 2023 17:00:38 -0400 Subject: [PATCH] fs: fix file descriptor validator PR-URL: https://github.com/nodejs/node/pull/49752 Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca --- lib/fs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 60594afe9809ad..015e424efbdf4c 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -131,7 +131,7 @@ const { CHAR_BACKWARD_SLASH, } = require('internal/constants'); const { - isUint32, + isInt32, parseFileMode, validateBoolean, validateBuffer, @@ -201,7 +201,7 @@ function makeStatsCallback(cb) { }; } -const isFd = isUint32; +const isFd = isInt32; function isFileType(stats, fileType) { // Use stats array directly to avoid creating an fs.Stats instance just for