Fix ACCESS_DENIED storage sync error on Windows
This commit is contained in:
parent
0dbd02abe9
commit
714011d1d3
1 changed files with 12 additions and 4 deletions
|
@ -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 = {};
|
||||
|
|
Loading…
Add table
Reference in a new issue