Permalink
Browse files

use stream pipi instead of deprecated pump method

  • Loading branch information...
Grigore147 committed Mar 24, 2013
1 parent 78bdd5b commit b6ca8574aae41355038b7351ad5b24d9e70d67a1
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/utils.js
View
@@ -306,9 +306,10 @@ module.exports = {
var src = Fs.createReadStream(source);
var dest = Fs.createWriteStream(destination);
- pump(src, dest, function(error) {
- callback(error);
- });
+ src.pipe(dest);
+
+ src.on('error', callback);
+ src.on('end', callback);
});
}

0 comments on commit b6ca857

Please sign in to comment.