callback is called next
This commit is contained in:
parent
99625c14a0
commit
2fb4b6bf4e
1 changed files with 2 additions and 2 deletions
|
@ -42,11 +42,11 @@ var extract = tar.extract();
|
||||||
extract.on('entry', function(header, stream, callback) {
|
extract.on('entry', function(header, stream, callback) {
|
||||||
// header is the tar header
|
// header is the tar header
|
||||||
// stream is the content body (might be an empty stream)
|
// stream is the content body (might be an empty stream)
|
||||||
// call callback when you are done with this entry
|
// call next when you are done with this entry
|
||||||
|
|
||||||
stream.resume(); // just auto drain the stream
|
stream.resume(); // just auto drain the stream
|
||||||
stream.on('end', function() {
|
stream.on('end', function() {
|
||||||
callback(); // ready for next entry
|
next(); // ready for next entry
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue