fixed bug 5662 - imap failed to discover folders and downloading mail messages; fixed memory leaks when building message URI; r=mscott, a=chofmann

This commit is contained in:
jefft%netscape.com 1999-04-29 00:13:55 +00:00
Родитель 2e20189fef
Коммит cf44b1fccb
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -320,17 +320,17 @@ nsresult nsBuildLocalMessageURI(const char *baseURI, PRUint32 key, char** uri)
if(!uri)
return NS_ERROR_NULL_POINTER;
// need to convert mailbox://hostname/.. to mailbox_message://hostname/..
// need to convert mailbox://hostname/.. to mailbox_message://hostname/..
nsAutoString tailURI(baseURI);
nsAutoString tailURI(baseURI);
// chop off mailbox:/
if (tailURI.Find(kMailboxRootURI) == 0)
tailURI.Cut(0, PL_strlen(kMailboxRootURI));
// chop off mailbox:/
if (tailURI.Find(kMailboxRootURI) == 0)
tailURI.Cut(0, PL_strlen(kMailboxRootURI));
const char *tail = tailURI.ToNewCString();
char *tail = tailURI.ToNewCString();
*uri = PR_smprintf("%s%s#%d", kMailboxMessageRootURI, tail, key);
delete[] tail;
return NS_OK;
}