Skip to content

Commit 3df3023

Browse files
committed
fix: don't close out stream in order to prevent sporadic "badf, write" error
Sometimes the out stream is closed before receiving stream's end event. In this case "EBADF: bad file descriptor, write" error is thrown.
1 parent 19a2d59 commit 3df3023

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/wrappers/file-system.ts

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export class FileSystem {
3737
const outfile = fs.createWriteStream(filePath);
3838
stream.once('end', () => {
3939
zipFile.readEntry();
40-
outfile.close();
4140
});
4241
stream.pipe(outfile);
4342
});

0 commit comments

Comments
 (0)