mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 05:45:33 +00:00
Used nsCAutoString function to find if there is port appended to popServerName and then used
truncate to get the popServerNamewithoutPort.
This commit is contained in:
parent
b454b7f9a0
commit
d948c0a5f6
@ -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