Fix ACCESS_DENIED storage sync error on Windows

This commit is contained in:
Dan Stillman 2008-09-05 02:42:54 +00:00
parent 0dbd02abe9
commit 714011d1d3

View file

@ -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 = {};