From 1ac712db12f437a7c630b0077047cd4367b2f0d8 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 16 Mar 2011 22:22:47 +0000 Subject: [PATCH] second attempt at fixing files left open --- chrome/content/zotero/xpcom/translation/browser_firefox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/browser_firefox.js b/chrome/content/zotero/xpcom/translation/browser_firefox.js index 21aef4e0a8..e915c8c874 100644 --- a/chrome/content/zotero/xpcom/translation/browser_firefox.js +++ b/chrome/content/zotero/xpcom/translation/browser_firefox.js @@ -13,7 +13,7 @@ (at your option) any later version. Zotero is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of + but WITHOUT ANY WARRANTY; without even the implied warranty ofc MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -289,13 +289,13 @@ Zotero.Translate.IO.Read.prototype = { }, "_openRawStream":function() { + if(this._rawStream) this._rawStream.close(); this._rawStream = Components.classes["@mozilla.org/network/file-input-stream;1"] .createInstance(Components.interfaces.nsIFileInputStream); this._rawStream.init(this.file, 0x01, 0664, 0); }, "_seekToStart":function(charset) { - if(this._rawStream) this._rawStream.close(); this._openRawStream(); this._linesExhausted = false;