fix upgrading of 4.x filters which are moves to local folders r=alecf,a=scottip 37320

This commit is contained in:
bienvenu%netscape.com 2000-06-03 22:19:47 +00:00
Родитель 3eab384a02
Коммит ab560af906
1 изменённых файлов: 13 добавлений и 6 удалений

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

@ -419,14 +419,21 @@ nsresult nsMsgFilter::ConvertMoveToFolderValue(nsCString &moveValue)
} }
if (NS_SUCCEEDED(rv) && localMailRoot) if (NS_SUCCEEDED(rv) && localMailRoot)
{ {
nsCOMPtr <nsIFolder> destIFolder; nsXPIDLCString localRootURI;
localMailRoot->FindSubFolder (moveValue, getter_AddRefs(destIFolder)); nsCOMPtr <nsIMsgFolder> destIMsgFolder;
nsCOMPtr <nsIMsgFolder> localMailRootMsgFolder = do_QueryInterface(localMailRoot);
localMailRoot->GetURI(getter_Copies(localRootURI));
nsCString destFolderUri = localRootURI;
// need to remove ".sbd" from moveValue, and perhaps escape it.
moveValue.ReplaceSubstring(".sbd/", "/");
destFolderUri.Append('/');
destFolderUri.Append(moveValue);
if (destIFolder) localMailRootMsgFolder->GetChildWithURI (destFolderUri, PR_TRUE, getter_AddRefs(destIMsgFolder));
if (destIMsgFolder)
{ {
nsCOMPtr <nsIMsgFolder> msgFolder; destIMsgFolder->GetURI(getter_Copies(folderUri));
msgFolder = do_QueryInterface(destIFolder);
destIFolder->GetURI(getter_Copies(folderUri));
m_action.m_folderUri.Assign(folderUri); m_action.m_folderUri.Assign(folderUri);
moveValue.Assign(folderUri); moveValue.Assign(folderUri);
} }