From 07d7d6d61a5cf3c6b013364d7b17fb1a2b325584 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Fri, 13 Jan 2006 19:38:07 +0000 Subject: [PATCH] #286557 r=bsdmedberg Allow an INI file to prevent profile migration --- toolkit/xre/nsAppRunner.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 03707137fbef..0de4bb8bbba7 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2180,6 +2180,24 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData) (do_GetService(NS_APPSTARTUP_CONTRACTID)); NS_ENSURE_TRUE(appStartup, 1); + if (gDoMigration) { + nsCOMPtr file; + profD->Clone(getter_AddRefs(file)); + file->AppendNative(NS_LITERAL_CSTRING("override.ini")); + nsINIParser parser; + nsCOMPtr localFile(do_QueryInterface(file)); + nsresult rv = parser.Init(localFile); + if (NS_SUCCEEDED(rv)) { + nsCAutoString buf; + rv = parser.GetString("XRE", "EnableProfileMigrator", buf); + if (NS_SUCCEEDED(rv)) { + if (buf[0] == '0' || buf[0] == 'f' || buf[0] == 'F') { + gDoMigration = PR_FALSE; + } + } + } + } + // Profile Migration if (gAppData->flags & NS_XRE_ENABLE_PROFILE_MIGRATOR && gDoMigration) { gDoMigration = PR_FALSE;