fix problem with extra .msf tacked on db names for imap r=mscott

This commit is contained in:
bienvenu%netscape.com 1999-12-07 22:04:12 +00:00
parent eff13fbde3
commit 49f8f78d79

View File

@ -330,10 +330,16 @@ nsresult nsImapMailFolder::CreateSubFolders(nsFileSpec &path)
// make the imap folder remember the file spec it was created with.
if (child)
{
nsCAutoString leafName (currentFolderNameStr);
nsCOMPtr <nsIFileSpec> msfFileSpec;
nsresult rv = NS_NewFileSpecWithSpec(currentFolderPath, getter_AddRefs(msfFileSpec));
if (NS_SUCCEEDED(rv) && msfFileSpec)
{
// leaf name is the db name w/o .msf (nsShouldIgnoreFile strips it off)
// so this trims the .msf off the file spec.
msfFileSpec->SetLeafName(leafName);
child->SetPath(msfFileSpec);
}
}
PL_strfree(folderName);
}