fix xml/e4x mode on very large files

This commit is contained in:
Simon Kornblith 2011-02-09 22:10:10 +00:00
parent a83fbb4fa8
commit 296c76ff3b

View file

@ -313,9 +313,14 @@ Zotero.Translate.IO.Read.prototype = {
"_readToString":function() {
var str = {};
var stringBits = [];
this.inputStream.QueryInterface(Components.interfaces.nsIUnicharInputStream);
this.inputStream.readString(this.file.fileSize, str);
return str.value;
while(1) {
var read = this.inputStream.readString(32768, str);
if(!read) break;
stringBits.push(str.value);
}
return stringBits.join("");
},
"_initRDF":function() {