зеркало из https://github.com/mozilla/pjs.git
Bug #264467 --> Crash when renaming a local folder to have a forward slash in it.
sr=bienvenu
This commit is contained in:
Родитель
3eeb159f47
Коммит
4d7d72f381
|
@ -1116,6 +1116,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rename(const PRUnichar *aNewName, nsIMsgWind
|
|||
nsCAutoString newDiskName;
|
||||
newDiskName.Assign(convertedNewName.get());
|
||||
NS_MsgHashIfNecessary(newDiskName);
|
||||
nsAutoString safeFolderName;
|
||||
safeFolderName.AssignWithConversion(newDiskName);
|
||||
|
||||
nsXPIDLCString oldLeafName;
|
||||
oldPathSpec->GetLeafName(getter_Copies(oldLeafName));
|
||||
|
@ -1170,7 +1172,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rename(const PRUnichar *aNewName, nsIMsgWind
|
|||
nsCOMPtr<nsIMsgFolder> newFolder;
|
||||
if (parentSupport)
|
||||
{
|
||||
rv = parentFolder->AddSubfolder(nsDependentString(aNewName), getter_AddRefs(newFolder));
|
||||
rv = parentFolder->AddSubfolder(safeFolderName, getter_AddRefs(newFolder));
|
||||
if (newFolder)
|
||||
{
|
||||
newFolder->SetPrettyName(aNewName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче