return CreateNewProfileWithLocales(profileName,nativeProfileDir,langcode,nsnull,useExistingDir);
nsresult rv = NS_OK;  #if defined(DEBUG_profile) printf("ProfileManager : CreateNewProfile\n"); printf("ProfileManagerData*** : %s\n", charData); #endif  NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv);  if (NS_FAILED(rv) || !locator) return NS_ERROR_FAILURE;  nsString data(charData);   SetDataArray(data);  char* dirName = GetValue("ProfileDir"); char* unescapedProfileName = GetValue("ProfileName");  if (!unescapedProfileName || !*unescapedProfileName) return NS_ERROR_FAILURE;    char* profileName = nsEscape(unescapedProfileName, url_Path);  nsFileSpec dirSpec(dirName);  if (!dirName || !*dirName) {   nsIFileSpec* horribleCOMDirSpecThing; rv = locator->GetFileLocation(nsSpecialFileSpec::App_DefaultUserProfileRoot50, &horribleCOMDirSpecThing);  if (NS_FAILED(rv) || !horribleCOMDirSpecThing) return NS_ERROR_FAILURE;   horribleCOMDirSpecThing->GetFileSpec(&dirSpec); NS_RELEASE(horribleCOMDirSpecThing);   }  #if defined(DEBUG_profile) printf("before SetProfileDir\n"); #endif  if (!dirSpec.Exists()) dirSpec.CreateDirectory();  dirSpec += profileName;    rv = SetProfileDir(unescapedProfileName, dirSpec);  PR_DELETE(unescapedProfileName);  #if defined(DEBUG_profile) printf("after SetProfileDir\n"); #endif  if (NS_FAILED(rv)) { nsCRT::free(profileName); return rv; }   nsIFileSpec* profDefaultsDir; rv = locator->GetFileLocation(nsSpecialFileSpec::App_ProfileDefaultsFolder50, &profDefaultsDir);  if (NS_FAILED(rv) || !profDefaultsDir) { nsCRT::free(profileName); return NS_ERROR_FAILURE; }  nsFileSpec defaultsDirSpec;  profDefaultsDir->GetFileSpec(&defaultsDirSpec); NS_RELEASE(profDefaultsDir);   if (defaultsDirSpec.Exists()) { defaultsDirSpec.RecursiveCopy(dirSpec); }  if (dirName) { PR_DELETE(dirName); } nsCRT::free(profileName);  return NS_OK;
nsProfile::CreateNewProfile(const PRUnichar* profileName,                             const PRUnichar* nativeProfileDir,                            const PRUnichar* langcode,                            PRBool useExistingDir){    return CreateNewProfileWithLocales(profileName,nativeProfileDir,langcode,nsnull,useExistingDir);}