commit 7ac1ba5242d3e2b090d14242a47aa64a12064eba
parent 9017aa69dbe17f2424ad438b5f1e4b4553f01f35
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 12 Nov 2014 20:09:39 -0500
Fix file sync error with Hola extension enabled
With Hola enabled, uploads were failing with NS_BASE_STREAM CLOSED -- it
seems to do something that causes the stream to be read more than once.
Adding REOPEN_ON_REWIND fixes this.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js
@@ -413,7 +413,8 @@ Zotero.Sync.Storage.ZFS = (function () {
var fis = Components.classes["@mozilla.org/network/file-input-stream;1"]
.createInstance(Components.interfaces.nsIFileInputStream);
- fis.init(file, 0x01, 0, Components.interfaces.nsIFileInputStream.CLOSE_ON_EOF);
+ fis.init(file, 0x01, 0, Components.interfaces.nsIFileInputStream.CLOSE_ON_EOF
+ | Components.interfaces.nsIFileInputStream.REOPEN_ON_REWIND);
var bis = Components.classes["@mozilla.org/network/buffered-input-stream;1"]
.createInstance(Components.interfaces.nsIBufferedInputStream)