From e595620a1ae8e67f630ba834ddd59d2b1a37862f Mon Sep 17 00:00:00 2001 From: Alex Kontos Date: Mon, 21 Aug 2023 18:57:53 +0100 Subject: [PATCH] fix: ensure no migration when using new profiles (cherry picked from commit c9b5de7529875e565897135b4ccd5b10965cd701) --- waterfox/browser/components/WaterfoxGlue.sys.mjs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/waterfox/browser/components/WaterfoxGlue.sys.mjs b/waterfox/browser/components/WaterfoxGlue.sys.mjs index 0bef02da80e2..b080453ec852 100644 --- a/waterfox/browser/components/WaterfoxGlue.sys.mjs +++ b/waterfox/browser/components/WaterfoxGlue.sys.mjs @@ -221,12 +221,14 @@ export const WaterfoxGlue = { "browser.migration.version", 128 ); + const waterfoxUIVersion = 1; - const waterfoxUIVersion = lazy.PrefUtils.get( - "browser.migration.waterfox_version", - 0 - ); - + if (!Services.prefs.prefHasUserValue("browser.migration.waterfox_version")) { + // This is a new profile, nothing to migrate. + Services.prefs.setIntPref("browser.migration.waterfox_version", waterfoxUIVersion); + return; + } + async function enableTheme(id) { const addon = await lazy.AddonManager.getAddonByID(id); // If we found it, enable it.