mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 480461: skip items that cannot be decrypted
This commit is contained in:
parent
7cdfbeed20
commit
bfa22eed1a
@ -291,23 +291,24 @@ SyncEngine.prototype = {
|
|||||||
let item;
|
let item;
|
||||||
let count = {applied: 0, reconciled: 0};
|
let count = {applied: 0, reconciled: 0};
|
||||||
this._lastSyncTmp = 0;
|
this._lastSyncTmp = 0;
|
||||||
|
|
||||||
while ((item = yield newitems.iter.next(self.cb))) {
|
while ((item = yield newitems.iter.next(self.cb))) {
|
||||||
this._lowMemCheck();
|
this._lowMemCheck();
|
||||||
try {
|
try {
|
||||||
yield item.decrypt(self.cb, ID.get('WeaveCryptoID').password);
|
yield item.decrypt(self.cb, ID.get('WeaveCryptoID').password);
|
||||||
|
if (yield this._reconcile.async(this, self.cb, item)) {
|
||||||
|
count.applied++;
|
||||||
|
yield this._applyIncoming.async(this, self.cb, item);
|
||||||
|
} else {
|
||||||
|
count.reconciled++;
|
||||||
|
this._log.trace("Skipping reconciled incoming item " + item.id);
|
||||||
|
if (this._lastSyncTmp < item.modified)
|
||||||
|
this._lastSyncTmp = item.modified;
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this._log.error("Could not decrypt incoming record: " +
|
this._log.error("Could not process incoming record: " +
|
||||||
Utils.exceptionStr(e));
|
Utils.exceptionStr(e));
|
||||||
}
|
}
|
||||||
if (yield this._reconcile.async(this, self.cb, item)) {
|
|
||||||
count.applied++;
|
|
||||||
yield this._applyIncoming.async(this, self.cb, item);
|
|
||||||
} else {
|
|
||||||
count.reconciled++;
|
|
||||||
this._log.trace("Skipping reconciled incoming item " + item.id);
|
|
||||||
if (this._lastSyncTmp < item.modified)
|
|
||||||
this._lastSyncTmp = item.modified;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.lastSync < this._lastSyncTmp)
|
if (this.lastSync < this._lastSyncTmp)
|
||||||
this.lastSync = this._lastSyncTmp;
|
this.lastSync = this._lastSyncTmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user