зеркало из https://github.com/mozilla/gecko-dev.git
fix upgrading of 4.x filters which are moves to local folders r=alecf,a=scottip 37320
This commit is contained in:
Родитель
3eab384a02
Коммит
ab560af906
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче