We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Other user reported it here. https://stackoverflow.com/questions/63524117/fs-createreadstream-with-pipe-fires-close-event-twice
My code + fix by switching to another zip library (node-stream-zip) https://github.com/sreenaths/mock-ats/pull/4/files
zipFiles.upload.forEach(function (file){ var unzipDir = file.path + "_dir/"; fs.createReadStream(file.path). pipe(unzip.Extract({ path: unzipDir }). on('close', function() { fs.readdir(unzipDir, function(err, files){ if (err) throw err; files.forEach(function(file){ var json = JSON.parse(fs.readFileSync(unzipDir + file, 'utf8')); extractData(data, json); }); completeCount++; if(completeCount == zipFiles.upload.length) { callback(data); } }); }) );
extra close event is triggered with files being [] for the first event and correctly populated for the second close event.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Other user reported it here.
https://stackoverflow.com/questions/63524117/fs-createreadstream-with-pipe-fires-close-event-twice
My code + fix by switching to another zip library (node-stream-zip)
https://github.com/sreenaths/mock-ats/pull/4/files
extra close event is triggered with files being [] for the first event and correctly populated for the second close event.
The text was updated successfully, but these errors were encountered: