rv = pPref->GetLocalizedUnicharPref("ldap_2.servers.pab.description", getter_Copies(dirName));
prefName.AssignLiteral("ldap_2.servers.pab.description");
nsresult AddressBookParser::ParseFile(){  // Initialize the parser for a run...  mLine.Truncate();  // this is converting 4.x to 6.0  if (mImportingComm4x && mDatabase)   {    return ParseLDIFFile();  }   // We are migrating 4.x profile    /* Get database file name */    char *leafName = nsnull;    if (mFileSpec) {        mFileSpec->GetLeafName(&leafName);        PRInt32 i = 0;        while (leafName[i] != '\0')        {            if (leafName[i] == '.')            {                leafName[i] = '\0';                break;            }            else                i++;        }        if (leafName)            mDbUri = PR_smprintf("%s%s.mab", kMDBDirectoryRoot, leafName);    }    // to do: we should use only one "return rv;" at the very end, instead of this    //  multi return structure    nsresult rv = NS_OK;    nsFileSpec* dbPath = nsnull;    char* fileName = PR_smprintf("%s.mab", leafName);    nsCOMPtr<nsIAddrBookSession> abSession =              do_GetService(NS_ADDRBOOKSESSION_CONTRACTID, &rv);     if(NS_SUCCEEDED(rv))        abSession->GetUserProfileDirectory(&dbPath);        /* create address book database  */    if (dbPath)    {        (*dbPath) += fileName;        nsCOMPtr<nsIAddrDatabase> addrDBFactory =                  do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);        if (NS_SUCCEEDED(rv) && addrDBFactory)            rv = addrDBFactory->Open(dbPath, PR_TRUE, getter_AddRefs(mDatabase), PR_TRUE);    }    NS_ENSURE_SUCCESS(rv, rv);    delete dbPath;    nsCOMPtr<nsIRDFService> rdfService = do_GetService (NS_RDF_CONTRACTID "/rdf-service;1", &rv);    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIRDFResource> parentResource;    rv = rdfService->GetResource(NS_LITERAL_CSTRING(kAllDirectoryRoot),                                 getter_AddRefs(parentResource));    nsCOMPtr<nsIAbDirectory> parentDir = do_QueryInterface(parentResource);    if (!parentDir)        return NS_ERROR_NULL_POINTER;    // Get Pretty name from prefs.    nsCOMPtr<nsIPref> pPref(do_GetService(NS_PREF_CONTRACTID, &rv));     if (NS_FAILED(rv) || !pPref)         return nsnull;    nsXPIDLString dirName;    if (strcmp(fileName, kPersonalAddressbook) == 0)        rv = pPref->GetLocalizedUnicharPref("ldap_2.servers.pab.description", getter_Copies(dirName));    else    {      nsCAutoString prefName;      prefName = NS_LITERAL_CSTRING("ldap_2.servers.") + nsDependentCString(leafName) + NS_LITERAL_CSTRING(".description");      rv = pPref->GetLocalizedUnicharPref(prefName.get(), getter_Copies(dirName));    }    // If a name is found then use it, otherwise use the filename as last resort.    if (NS_FAILED(rv) || dirName.IsEmpty())      dirName = NS_ConvertASCIItoUCS2(leafName);    parentDir->CreateDirectoryByURI(dirName, mDbUri, mMigrating);            rv = ParseLDIFFile();    if (leafName)        nsCRT::free(leafName);    if (fileName)        PR_smprintf_free(fileName);    return rv;}