From 34bc072425aee7507ce0b25e7644ba6a8fb194db Mon Sep 17 00:00:00 2001 From: Peter Lambert Date: Fri, 12 Jan 2024 01:12:26 -0600 Subject: [PATCH] Fix bug: in glob.js scan(), after writing files, properly end writable stream by calling stream.end() - previous code `stream.emit( 'end' )` would cause cut off src() downloads after 16 files, or more accurately, after stream.highWaterMark files --- lib/glob.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/glob.js b/lib/glob.js index 7b11c76..e18b7a6 100644 --- a/lib/glob.js +++ b/lib/glob.js @@ -50,7 +50,7 @@ function glob( globs, options ) { --scanning; - if ( scanning === 0 ) stream.emit( 'end' ); + if ( scanning === 0 ) stream.end(); }