make LOC/WebVoyage scraper and other scrapers using Scholar.loadTranslator work again

This commit is contained in:
Simon Kornblith 2006-08-09 18:59:38 +00:00
parent f3a66085f5
commit 3a1ffb6174

View file

@ -1202,13 +1202,13 @@ Scholar.Translate.prototype._storageStreamFunctions = function(read, write) {
var me = this;
if(write) {
// set up write() method
var fStream = _storageStream.getOutputStream(0);
var fStream = this._storageStream.getOutputStream(0);
this._sandbox.Scholar.write = function(data) { fStream.write(data, data.length) };
// set Scholar.eof() to close the storage stream
this._sandbox.Scholar.eof = function() {
this._storageStream.QueryInterface(Components.interfaces.nsIOutputStream);
this._storageStream.close();
fStream.QueryInterface(Components.interfaces.nsIOutputStream);
fStream.close();
}
}