We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f4533e commit 2c41571Copy full SHA for 2c41571
src/library_nodefs.js
@@ -248,15 +248,13 @@ addToLibrary({
248
open(stream) {
249
var path = NODEFS.realPath(stream.node);
250
NODEFS.tryFSOperation(() => {
251
- if (FS.isFile(stream.node.mode)) {
252
- stream.shared.refcount = 1;
253
- stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags));
254
- }
+ stream.shared.refcount = 1;
+ stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags));
255
});
256
},
257
close(stream) {
258
259
- if (FS.isFile(stream.node.mode) && stream.nfd && --stream.shared.refcount === 0) {
+ if (stream.nfd && --stream.shared.refcount === 0) {
260
fs.closeSync(stream.nfd);
261
}
262
0 commit comments