From dead0e6ce8fe3a91957a38e2e2865ab127c02d0d Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Wed, 14 Jun 2006 17:04:48 +0000 Subject: [PATCH] 341007 "Failed to initialize embedding" during startup. Remove compatibility.ini before beginning registration process. r=pink --- camino/src/preferences/PreferenceManager.mm | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/camino/src/preferences/PreferenceManager.mm b/camino/src/preferences/PreferenceManager.mm index d975b03483d9..e49b9544fca8 100644 --- a/camino/src/preferences/PreferenceManager.mm +++ b/camino/src/preferences/PreferenceManager.mm @@ -570,12 +570,24 @@ static BOOL gMadePrefManager; nsCOMPtr file; profileDir->Clone(getter_AddRefs(file)); if (file) { - file->AppendNative(NS_LITERAL_CSTRING("compreg.dat")); - file->Remove(PR_FALSE); - file->SetNativeLeafName(NS_LITERAL_CSTRING("xpti.dat")); - file->Remove(PR_FALSE); - file->SetNativeLeafName(NS_LITERAL_CSTRING("XUL.mfasl")); - file->Remove(PR_FALSE); + const char* kVolatileProfileFiles[] = { + "compatibility.ini", + "compreg.dat", + "xpti.dat", + "XUL.mfasl", + nsnull + }; + + // dummy name, will be replaced with real filenames from the list above + file->AppendNative(NS_LITERAL_CSTRING("M")); + + const char** filenames = kVolatileProfileFiles; + const char* filename; + while ((filename = *filenames)) { + file->SetNativeLeafName(nsDependentCString(filename)); + file->Remove(PR_FALSE); + filenames++; + } } }