Bug 480381 - "lastsync" pref is sometimes a number and sometimes a string
--- a/services/sync/modules/service.js
+++ b/services/sync/modules/service.js
@@ -692,18 +692,17 @@ WeaveSvc.prototype = {
if (!(yield this._syncEngine.async(this, self.cb, engine))) {
this._log.info("Aborting sync");
break;
}
}
if (!this._syncError) {
- Svc.Prefs.reset("lastsync");
- Svc.Prefs.set("lastsync", new Date().toString());
+ Svc.Prefs.set("lastSync", new Date().toString());
this._log.info("Sync completed successfully");
} else
this._log.warn("Some engines did not sync correctly");
} finally {
this.cancelRequested = false;
this._syncError = false;
}
@@ -770,18 +769,17 @@ WeaveSvc.prototype = {
// reset the threshold to the initial value, and start over again).
this._syncThresholds[engine.name] -= THRESHOLD_DECREMENT_STEP;
if (this._syncThresholds[engine.name] <= 0)
this._syncThresholds[engine.name] = 1;
}
}
if (!this._syncError) {
- Svc.Prefs.reset("lastsync");
- Svc.Prefs.set("lastsync", Date.now());
+ Svc.Prefs.set("lastSync", new Date().toString());
this._log.info("Sync completed successfully");
} else
this._log.warn("Some engines did not sync correctly");
} finally {
this._cancelRequested = false;
this._syncError = false;
}