fix failure to play back offline imap deletes with the delete immediately delete model r=naving sr=sspitzer 93710

This commit is contained in:
bienvenu%netscape.com 2002-02-06 03:54:56 +00:00
Родитель 085ea30a51
Коммит 7084eedef2
1 изменённых файлов: 9 добавлений и 2 удалений

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

@ -577,8 +577,15 @@ NS_IMETHODIMP nsMailDatabase::GetOfflineOpForKey(nsMsgKey msgKey, PRBool create,
if (*offlineOp)
(*offlineOp)->SetMessageKey(msgKey);
nsCOMPtr <nsIMsgDBHdr> msgHdr;
GetMsgHdrForKey(msgKey, getter_AddRefs(msgHdr));
// GetMsgHdrForKey will return an empty header if no header exists,
// so we only want to get the hdr if the db contains a hdr for
// that key - otherwise, we'll crunch the new flags.
PRBool containsKey;
rv = ContainsKey(msgKey , &containsKey);
if (NS_SUCCEEDED(rv) && containsKey)
GetMsgHdrForKey(msgKey, getter_AddRefs(msgHdr));
if (msgHdr)
{
imapMessageFlagsType imapFlags = kNoImapMsgFlag;