feat: modify profile name
(cherry picked from commit 15940da685e89c698162c24e67587a18189a2ac9)
This commit is contained in:
@@ -75,7 +75,7 @@
|
|||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
#define DEV_EDITION_NAME "dev-edition-default"
|
#define DEV_EDITION_NAME "dev-edition-default"
|
||||||
#define DEFAULT_NAME "default"
|
#define DEFAULT_NAME "68-edition-default"
|
||||||
#define COMPAT_FILE u"compatibility.ini"_ns
|
#define COMPAT_FILE u"compatibility.ini"_ns
|
||||||
#define PROFILE_DB_VERSION "2"
|
#define PROFILE_DB_VERSION "2"
|
||||||
#define INSTALL_PREFIX "Install"
|
#define INSTALL_PREFIX "Install"
|
||||||
@@ -1218,6 +1218,21 @@ nsresult nsToolkitProfileService::Init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Safety net for non‑DevEdition builds:
|
||||||
|
// If we detected a first run but there is exactly one profile and it was
|
||||||
|
// classified as "dev-edition default" (due to a name collision), treat it as
|
||||||
|
// the normal default instead of creating a new profile.
|
||||||
|
if (!mUseDevEditionProfile && mDevEditionDefault && !mNormalDefault &&
|
||||||
|
nonDevEditionProfiles == 0 && mProfiles.getFirst() == mProfiles.getLast()) {
|
||||||
|
SetNormalDefault(mDevEditionDefault);
|
||||||
|
// For non-dedicated profiles, directly avoid first-run.
|
||||||
|
if (!mUseDedicatedProfile) {
|
||||||
|
mIsFirstRun = false;
|
||||||
|
}
|
||||||
|
// In dedicated-profile mode, keep mIsFirstRun as-is so the adoption path
|
||||||
|
// in SelectStartupProfile can run with mNormalDefault set.
|
||||||
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user