Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fs: fix realpath inode link caching
  • Loading branch information
lundibundi committed Jun 18, 2020
commit c0b8202a7d8e3ba20fd6b5c0d6feb475e6b224a4
6 changes: 5 additions & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const kIoMaxLength = 2 ** 31 - 1;
const {
Map,
MathMax,
Number,
NumberIsSafeInteger,
ObjectCreate,
ObjectDefineProperties,
Expand Down Expand Up @@ -182,7 +183,10 @@ const isFd = isUint32;
function isFileType(stats, fileType) {
// Use stats array directly to avoid creating an fs.Stats instance just for
// our internal use.
return (stats[1/* mode */] & S_IFMT) === fileType;
let mode = stats[1];
if (typeof mode === 'bigint')
mode = Number(mode);
return (mode & S_IFMT) === fileType;
}

function access(path, mode, callback) {
Expand Down