Used nsCAutoString function to find if there is port appended to popServerName and then used
truncate to get the popServerNamewithoutPort. git-svn-id: svn://10.0.0.236/trunk@77810 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bca6574dc5
commit
69653078fe
@ -917,17 +917,17 @@ nsPrefMigration::ProcessPrefsCallback(const char* oldProfilePathStr, const char
|
||||
|
||||
m_prefs->CopyCharPref(PREF_NETWORK_HOSTS_POP_SERVER, &popServerName);
|
||||
|
||||
//popServerName = strtok (popServerName,":");
|
||||
int i =0;
|
||||
while (popServerName[i] != '\0' ){
|
||||
if ( popServerName[i] == ':' ) {
|
||||
popServerName[i] = '\0';
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
nsCAutoString popServerNamewithoutPort(popServerName);
|
||||
PRInt32 colonPos = popServerNamewithoutPort.FindChar(':');
|
||||
|
||||
if (colonPos != -1 ) {
|
||||
popServerNamewithoutPort.Truncate(colonPos);
|
||||
rv = newPOPMailPath->AppendRelativeUnixPath(popServerNamewithoutPort);
|
||||
}
|
||||
else {
|
||||
rv = newPOPMailPath->AppendRelativeUnixPath(popServerName);
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = newPOPMailPath->Exists(&exists);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user