diff --git a/main.js b/main.js index dd73eab..6db3e05 100644 --- a/main.js +++ b/main.js @@ -1590,7 +1590,14 @@ function seedBundledAddons() { if (!bundleVer) continue; // broken bundle — skip rather than corrupt user state if (fs.existsSync(target)) { const userVer = readAddonVersion(target); - if (userVer === bundleVer) continue; + // Only reseed when the bundle is STRICTLY NEWER than what's in + // userData. The old check `userVer === bundleVer ? continue` would + // reseed whenever the versions differed — including the OTA case + // where promoteStagedUpdates just promoted a newer addon than the + // one baked into the installer, silently downgrading it on the same + // boot. Version-compare with the same cmpVer helper the promoter + // uses so both sides agree on ordering. + if (userVer && cmpVersions(userVer, bundleVer) >= 0) continue; // Backups go in a sibling folder so AddonHost's directory scan doesn't // pick them up as duplicate addons with the same manifest id. const backupsRoot = addonsBackupDir();