fix files left open, tested this time

This commit is contained in:
Simon Kornblith 2011-03-16 22:45:00 +00:00
parent 1ac712db12
commit 402fa961ef

View file

@ -335,10 +335,15 @@ Zotero.Translate.IO.Read.prototype = {
Zotero.debug("Translate: Initializing RDF data store"); Zotero.debug("Translate: Initializing RDF data store");
this._dataStore = new Zotero.RDF.AJAW.RDFIndexedFormula(); this._dataStore = new Zotero.RDF.AJAW.RDFIndexedFormula();
var parser = new Zotero.RDF.AJAW.RDFParser(this._dataStore); var parser = new Zotero.RDF.AJAW.RDFParser(this._dataStore);
var nodes = Zotero.Translate.IO.parseDOMXML(this._rawStream, this._charset, this.file.fileSize); try {
parser.parse(nodes, baseURI); var nodes = Zotero.Translate.IO.parseDOMXML(this._rawStream, this._charset, this.file.fileSize);
parser.parse(nodes, baseURI);
this.RDF = new Zotero.Translate.IO._RDFSandbox(this._dataStore);
this.RDF = new Zotero.Translate.IO._RDFSandbox(this._dataStore);
} catch(e) {
this.close();
throw "Translate: No RDF found";
}
}, },
"setCharacterSet":function(charset) { "setCharacterSet":function(charset) {