diff --git a/mozilla/profile/resources/locale/en-US/profileManager.properties b/mozilla/profile/resources/locale/en-US/profileManager.properties
index adf382babf6..2e8a5d761c7 100644
--- a/mozilla/profile/resources/locale/en-US/profileManager.properties
+++ b/mozilla/profile/resources/locale/en-US/profileManager.properties
@@ -3,7 +3,7 @@ noneselectedrename=You must select a profile to rename.
wrongnumberselectedrename=You can only rename one profile at a time. Please select only one profile and try again.
migratebeforerename=The profile you have selected was created with a previous version of Communicator and must be converted to a Mozilla profile before it can be renamed. Do you want to convert this profile now?
migratebeforedelete=The profile you have selected was created with a previous version of Communicator and must be converted to a Mozilla profile before it can be deleted. Do you want to convert this profile now?Its really really stupid to enforce this. Please let us not require someone to migrate a profile before deleting it! --Ben.
-migratebeforestart=The profile you have selected was created with a previous version of Communicator and must be converted before you can use it with Mozilla. Mozilla can convert this profile for you automatically, but once converted you will not be able to use it in the version of Communicator that created it. Choose OK to convert the profile, or Cancel to return to the Profile Manager and select another.
+migratebeforestart=The profile you have selected was created with a previous version of Communicator and must be converted before you can use it with Mozilla. Mozilla can copy your 4.x profile to use for 5.0. Your original 4.x profile will not be altered.Choose OK to convert the profile, or Cancel to return to the Profile Manager and select another.
renamefailed=Sorry, Mozilla has failed to rename the profile you have selected.Resolution:1) Restart Mozilla and try again. 2) Close other applications or restart your computer.3) Check to ensure the profile files are not damaged.
renameprofilepromptA=Rename the profile "
renameprofilepromptB=" to:
@@ -22,4 +22,4 @@ exitButton=Exit
deleteFiles=Delete Files
dontDeleteFiles=Don't Delete Files
-cancel=Cancel
\ No newline at end of file
+cancel=Cancel
diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp
index 3385b14e92f..139491a5558 100644
--- a/mozilla/profile/src/nsProfile.cpp
+++ b/mozilla/profile/src/nsProfile.cpp
@@ -84,7 +84,6 @@
// A default profile name, in case automigration 4x profile fails
#define DEFAULT_PROFILE_NAME "default"
-// kill me now.
#define REGISTRY_YES_STRING "yes"
#define REGISTRY_NO_STRING "no"
@@ -105,9 +104,10 @@
#define PREF_CONFIRM_AUTOMIGRATION "profile.confirm_automigration"
-#if defined(DEBUG_sspitzer) || defined(DEBUG_seth)
-#define DEBUG_profile_ 1
-#endif
+// we want everyone to have the debugging info to the console for now
+// to help track down profile manager problems
+// when we ship, we'll turn this off
+#define DEBUG_profile 1
// ProfileAccess varaible (gProfileDataAccess) to access registry operations
// gDataAccessInstCount is used to keep track of instance count to activate
@@ -391,9 +391,6 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs,
printf("Profile Manager : Command Line Options : Begin\n");
#endif
- rv = MigrateProfileInfo();
- if (NS_FAILED(rv)) return rv;
-
// check for command line arguments for profile manager
//
// -P command line option works this way:
@@ -526,6 +523,9 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs,
rv = cmdLineArgs->GetCmdLineValue(INSTALLER_CMD_LINE_ARG, &cmdResult);
if (NS_SUCCEEDED(rv))
{
+ rv = MigrateProfileInfo();
+ if (NS_FAILED(rv)) return rv;
+
if (cmdResult) {
PRInt32 num4xProfiles = 0;
rv = Get4xProfileCount(&num4xProfiles);
@@ -565,6 +565,14 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs,
}
}
}
+
+#ifdef DEBUG
+ if (profileURLStr.Length() == 0) {
+ printf("DEBUG BUILDS ONLY: we are forcing you to use the profile manager to help smoke test it.\n");
+ profileURLStr = PROFILE_MANAGER_URL;
+ }
+#endif /* DEBUG */
+
#ifdef DEBUG_profile
printf("Profile Manager : Command Line Options : End\n");
#endif
diff --git a/mozilla/profile/src/nsProfileAccess.cpp b/mozilla/profile/src/nsProfileAccess.cpp
index 6f93a45cb5c..5c526e7fccc 100644
--- a/mozilla/profile/src/nsProfileAccess.cpp
+++ b/mozilla/profile/src/nsProfileAccess.cpp
@@ -36,7 +36,6 @@
#include "nsFileStream.h"
#include "nsEscape.h"
-// kill me now.
#define REGISTRY_YES_STRING "yes"
#define REGISTRY_NO_STRING "no"
@@ -933,35 +932,53 @@ nsProfileAccess::Get4xProfileInfo(const char *registryName)
}
if (unixProfileName && unixProfileDirectory) {
+ nsCAutoString profileLocation(unixProfileDirectory);
+ profileLocation += "/.netscape";
+
+ nsCOMPtr users4xDotNetscapeDirectory;
+ rv = NS_NewFileSpec(getter_AddRefs(users4xDotNetscapeDirectory));
+ if (NS_FAILED(rv)) return rv;
+
+ rv = users4xDotNetscapeDirectory->SetNativePath((const char *)profileLocation);
+ if (NS_FAILED(rv)) return rv;
- ProfileStruct* profileItem = new ProfileStruct();
- if (!profileItem)
- return NS_ERROR_OUT_OF_MEMORY;
+ rv = users4xDotNetscapeDirectory->Exists(&exists);
+ if (NS_FAILED(rv)) return rv;
- profileItem->profileName = nsnull;
- profileItem->profileLocation = nsnull;
- profileItem->isMigrated = nsnull;
- profileItem->NCProfileName = nsnull;
- profileItem->NCDeniedService = nsnull;
- profileItem->NCEmailAddress = nsnull;
- profileItem->NCHavePregInfo = nsnull;
- profileItem->updateProfileEntry = PR_TRUE;
+#ifdef DEBUG
+ printf("%s exists: %d\n",(const char *)profileLocation, exists);
+#endif
+ if (exists) {
+ ProfileStruct* profileItem = new ProfileStruct();
+ if (!profileItem)
+ return NS_ERROR_OUT_OF_MEMORY;
- profileItem->profileName = nsCRT::strdup(nsUnescape(unixProfileName));
- profileItem->profileLocation = nsCRT::strdup(unixProfileDirectory);
- PRInt32 length = PL_strlen(unixProfileDirectory) + PL_strlen("/.netscape");
- profileItem->profileLocation = (char *) PR_Realloc(profileItem->profileLocation, length+1);
- PL_strcpy(profileItem->profileLocation, unixProfileDirectory);
- PL_strcat(profileItem->profileLocation, "/.netscape");
-
- profileItem->isMigrated = nsCRT::strdup(REGISTRY_NO_STRING);
-
- if (!m4xProfiles)
- m4xProfiles = new nsVoidArray();
- m4xProfiles->AppendElement((void*)profileItem);
-
- mNumOldProfiles++;
+ profileItem->profileName = nsnull;
+ profileItem->profileLocation = nsnull;
+ profileItem->isMigrated = nsnull;
+ profileItem->NCProfileName = nsnull;
+ profileItem->NCDeniedService = nsnull;
+ profileItem->NCEmailAddress = nsnull;
+ profileItem->NCHavePregInfo = nsnull;
+ profileItem->updateProfileEntry = PR_TRUE;
+
+ profileItem->profileName = nsCRT::strdup(nsUnescape(unixProfileName));
+ profileItem->profileLocation = nsCRT::strdup((const char *)profileLocation);
+
+ profileItem->isMigrated = nsCRT::strdup(REGISTRY_NO_STRING);
+
+ if (!m4xProfiles)
+ m4xProfiles = new nsVoidArray();
+ m4xProfiles->AppendElement((void*)profileItem);
+
+ mNumOldProfiles++;
+ }
+ else {
+#ifdef DEBUG
+ printf("no 4.x profile\n");
+#endif
+ }
}
#endif