Fix web-based installation of non-small styles

This commit is contained in:
Dan Stillman 2008-10-31 19:46:10 +00:00
parent 4d7bca4f43
commit c06dd16ffa

View file

@ -150,6 +150,7 @@ Zotero.MIMETypeHandler = new function () {
this._request = request; this._request = request;
this._contentType = contentType this._contentType = contentType
this._storageStream = null; this._storageStream = null;
this._outputStream = null;
this._binaryInputStream = null; this._binaryInputStream = null;
} }
@ -182,6 +183,7 @@ Zotero.MIMETypeHandler = new function () {
this._storageStream = Components.classes["@mozilla.org/storagestream;1"]. this._storageStream = Components.classes["@mozilla.org/storagestream;1"].
createInstance(Components.interfaces.nsIStorageStream); createInstance(Components.interfaces.nsIStorageStream);
this._storageStream.init(4096, 4294967295, null); // PR_UINT32_MAX this._storageStream.init(4096, 4294967295, null); // PR_UINT32_MAX
this._outputStream = this._storageStream.getOutputStream(0);
this._binaryInputStream = Components.classes["@mozilla.org/binaryinputstream;1"]. this._binaryInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].
createInstance(Components.interfaces.nsIBinaryInputStream); createInstance(Components.interfaces.nsIBinaryInputStream);
@ -189,8 +191,7 @@ Zotero.MIMETypeHandler = new function () {
} }
var bytes = this._binaryInputStream.readBytes(count); var bytes = this._binaryInputStream.readBytes(count);
var outputStream = this._storageStream.getOutputStream(0); this._outputStream.write(bytes, count);
outputStream.write(bytes, count);
} }
/** /**