Commit f684427d authored by nerminator's avatar nerminator Committed by GitHub

fix({stat,readdir}/isDirectory): FileAttributes is a bit field (#69)

Fixes #68
parent c96be3ed
...@@ -14,7 +14,7 @@ module.exports = function stat(file) { ...@@ -14,7 +14,7 @@ module.exports = function stat(file) {
if (typeof attr !== 'number') { if (typeof attr !== 'number') {
attr = BigInt.fromBuffer(attr).toNumber(); attr = BigInt.fromBuffer(attr).toNumber();
} }
return attr === DIRECTORY; return (attr & DIRECTORY) == DIRECTORY;
}, },
}; };
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment