Skip to content

Commit

Permalink
Try harder to prevent sync-in-progress messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Jul 11, 2017
1 parent c701f34 commit fd7c2a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chrome/content/zotero/xpcom/sync/syncRunner.js
Expand Up @@ -119,12 +119,12 @@ Zotero.Sync.Runner_Module = function (options = {}) {
_syncInProgress = true;
_stopping = false;

yield Zotero.Notifier.trigger('start', 'sync', []);

// Purge deleted objects so they don't cause sync errors (e.g., long tags)
yield Zotero.purgeDataObjects(true);

try {
yield Zotero.Notifier.trigger('start', 'sync', []);

// Purge deleted objects so they don't cause sync errors (e.g., long tags)
yield Zotero.purgeDataObjects(true);

let apiKey = yield _getAPIKey();
if (!apiKey) {
throw new Zotero.Error("API key not set", Zotero.Error.ERROR_API_KEY_NOT_SET);
Expand Down Expand Up @@ -801,12 +801,12 @@ Zotero.Sync.Runner_Module = function (options = {}) {


this.end = Zotero.Promise.coroutine(function* (options) {
_syncInProgress = false;
yield this.checkErrors(_errors, options);
if (!options.restartSync) {
this.updateIcons(_errors);
}
_errors = [];
_syncInProgress = false;
});


Expand Down

0 comments on commit fd7c2a6

Please sign in to comment.