make LOC/WebVoyage scraper and other scrapers using Scholar.loadTranslator work again
This commit is contained in:
parent
f3a66085f5
commit
3a1ffb6174
|
@ -1202,13 +1202,13 @@ Scholar.Translate.prototype._storageStreamFunctions = function(read, write) {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(write) {
|
if(write) {
|
||||||
// set up write() method
|
// 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) };
|
this._sandbox.Scholar.write = function(data) { fStream.write(data, data.length) };
|
||||||
|
|
||||||
// set Scholar.eof() to close the storage stream
|
// set Scholar.eof() to close the storage stream
|
||||||
this._sandbox.Scholar.eof = function() {
|
this._sandbox.Scholar.eof = function() {
|
||||||
this._storageStream.QueryInterface(Components.interfaces.nsIOutputStream);
|
fStream.QueryInterface(Components.interfaces.nsIOutputStream);
|
||||||
this._storageStream.close();
|
fStream.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user