From c06dd16ffac38c77090a5e2f888bf0765496bef3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 31 Oct 2008 19:46:10 +0000 Subject: [PATCH] Fix web-based installation of non-small styles --- chrome/content/zotero/xpcom/mimeTypeHandler.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/mimeTypeHandler.js b/chrome/content/zotero/xpcom/mimeTypeHandler.js index 8969241ddb..a0f6c354e3 100644 --- a/chrome/content/zotero/xpcom/mimeTypeHandler.js +++ b/chrome/content/zotero/xpcom/mimeTypeHandler.js @@ -150,6 +150,7 @@ Zotero.MIMETypeHandler = new function () { this._request = request; this._contentType = contentType this._storageStream = null; + this._outputStream = null; this._binaryInputStream = null; } @@ -182,6 +183,7 @@ Zotero.MIMETypeHandler = new function () { this._storageStream = Components.classes["@mozilla.org/storagestream;1"]. createInstance(Components.interfaces.nsIStorageStream); this._storageStream.init(4096, 4294967295, null); // PR_UINT32_MAX + this._outputStream = this._storageStream.getOutputStream(0); this._binaryInputStream = Components.classes["@mozilla.org/binaryinputstream;1"]. createInstance(Components.interfaces.nsIBinaryInputStream); @@ -189,8 +191,7 @@ Zotero.MIMETypeHandler = new function () { } var bytes = this._binaryInputStream.readBytes(count); - var outputStream = this._storageStream.getOutputStream(0); - outputStream.write(bytes, count); + this._outputStream.write(bytes, count); } /**