commit 714011d1d30c760248ffcdd6d3cc547e8fb69aa6
parent 0dbd02abe982148bd9332f95dc932487b25b26ee
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 5 Sep 2008 02:42:54 +0000
Fix ACCESS_DENIED storage sync error on Windows
Diffstat:
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -1201,7 +1201,8 @@ Zotero.Sync.Storage = new function () {
{
onProgress: _updateProgress,
onStop: _onUploadComplete,
- item: item
+ item: item,
+ streams: [fis, bis]
}
);
channel.notificationCallbacks = listener;
@@ -2019,9 +2020,10 @@ Zotero.Sync.Storage.ZipWriterObserver.prototype = {
/**
* Possible properties of data object:
- * - onStart f(request)
- * - onProgress f(name, progess, progressMax)
- * - onStop f(request, status, response, data)
+ * - onStart: f(request)
+ * - onProgress: f(name, progess, progressMax)
+ * - onStop: f(request, status, response, data)
+ * - streams: array of streams to close on completion
* - Other values to pass to onStop()
*/
Zotero.Sync.Storage.StreamListener = function (data) {
@@ -2137,6 +2139,12 @@ Zotero.Sync.Storage.StreamListener.prototype = {
request.QueryInterface(Components.interfaces.nsIRequest);
}
+ if (this._data.streams) {
+ for each(var stream in this._data.streams) {
+ stream.close();
+ }
+ }
+
if (this._data.onStop) {
// Remove callbacks before passing along
var passData = {};