зеркало из https://github.com/mozilla/pjs.git
Fix for 48812. submitted by Gemal. r=scottip. Some null ptr checks.
This commit is contained in:
Родитель
7ab85b808d
Коммит
f24b877c97
|
@ -91,11 +91,13 @@ function MsgCopyMessage(destFolder)
|
||||||
destMsgFolder = destResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
destMsgFolder = destResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||||
|
|
||||||
var srcFolder = GetLoadedMsgFolder();
|
var srcFolder = GetLoadedMsgFolder();
|
||||||
var compositeDataSource = GetCompositeDataSource("Copy");
|
if(srcFolder)
|
||||||
var messages = GetSelectedMessages();
|
{
|
||||||
|
var compositeDataSource = GetCompositeDataSource("Copy");
|
||||||
|
var messages = GetSelectedMessages();
|
||||||
|
|
||||||
CopyMessages(compositeDataSource, srcFolder, destMsgFolder, messages, false);
|
CopyMessages(compositeDataSource, srcFolder, destMsgFolder, messages, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MsgMoveMessage(destFolder)
|
function MsgMoveMessage(destFolder)
|
||||||
|
@ -106,20 +108,23 @@ function MsgMoveMessage(destFolder)
|
||||||
destMsgFolder = destResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
destMsgFolder = destResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||||
|
|
||||||
var srcFolder = GetLoadedMsgFolder();
|
var srcFolder = GetLoadedMsgFolder();
|
||||||
var compositeDataSource = GetCompositeDataSource("Move");
|
if(srcFolder)
|
||||||
var messages = GetSelectedMessages();
|
|
||||||
|
|
||||||
var srcResource = srcFolder.QueryInterface(Components.interfaces.nsIRDFResource);
|
|
||||||
var srcUri = srcResource.Value;
|
|
||||||
if (srcUri.substring(0,6) == "news:/")
|
|
||||||
{
|
{
|
||||||
CopyMessages(compositeDataSource, srcFolder, destMsgFolder, messages, false);
|
var compositeDataSource = GetCompositeDataSource("Move");
|
||||||
}
|
var messages = GetSelectedMessages();
|
||||||
else
|
|
||||||
{
|
|
||||||
SetNextMessageAfterDelete(null, true);
|
|
||||||
|
|
||||||
CopyMessages(compositeDataSource, srcFolder, destMsgFolder, messages, true);
|
var srcResource = srcFolder.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||||
|
var srcUri = srcResource.Value;
|
||||||
|
if (srcUri.substring(0,6) == "news:/")
|
||||||
|
{
|
||||||
|
CopyMessages(compositeDataSource, srcFolder, destMsgFolder, messages, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetNextMessageAfterDelete(null, true);
|
||||||
|
|
||||||
|
CopyMessages(compositeDataSource, srcFolder, destMsgFolder, messages, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче