Index: lib/adblockplus_compat.js |
=================================================================== |
--- a/lib/adblockplus_compat.js |
+++ b/lib/adblockplus_compat.js |
@@ -203,19 +203,22 @@ require.scopes.io = |
}, callback); |
}, callback); |
}, |
copyFile: function(fromFile, toFile, callback) |
{ |
// Simply combine read and write operations |
var data = []; |
- this.readFromFile(fromFile, false, function(line) |
- { |
- data.push(line); |
+ this.readFromFile(fromFile, false, { |
+ process: function(line) |
+ { |
+ if (line !== null) |
+ data.push(line); |
+ } |
}, function(e) |
{ |
if (e) |
callback(e); |
else |
this.writeToFile(toFile, false, data, callback); |
}.bind(this)); |
}, |