Skip to content

Commit 2d48c6c

Browse files
committed
call original fsBinding.open when collecting ReadFileContext proto to avoid creating open handle
1 parent 313cd08 commit 2d48c6c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/readfilecontext.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ exports.getReadFileContextPrototype = function() {
1717
let proto;
1818
fsBinding.open = (_path, _flags, _mode, req) => {
1919
proto = Object.getPrototypeOf(req.context);
20+
originalOpen.apply(fsBinding, [_path, _flags, _mode, req]);
2021
};
2122

2223
fs.readFile('/ignored.txt', () => {});

0 commit comments

Comments
 (0)