part of fix for problems saving imap messages offline as templates, rs=sspitzer 81690

This commit is contained in:
bienvenu%netscape.com 2001-09-11 01:23:51 +00:00
parent e51414a486
commit 4b3f5e162f

View File

@ -516,13 +516,18 @@ NS_IMETHODIMP nsMailDatabase::GetOfflineOpForKey(nsMsgKey msgKey, PRBool create,
nsIMdbRow *offlineOpRow;
err = m_mdbStore->GetRow(GetEnv(), &rowObjectId, &offlineOpRow);
if (!offlineOpRow && create)
if (create)
{
err = m_mdbStore->NewRowWithOid(GetEnv(), &rowObjectId, &offlineOpRow);
NS_ENSURE_SUCCESS(err, err);
if (offlineOpRow)
if (!offlineOpRow)
{
err = m_mdbStore->NewRowWithOid(GetEnv(), &rowObjectId, &offlineOpRow);
NS_ENSURE_SUCCESS(err, err);
}
if (offlineOpRow && !hasOid)
{
m_mdbAllOfflineOpsTable->AddRow(GetEnv(), offlineOpRow);
newOp = PR_TRUE;
newOp = PR_TRUE;
}
}
if (err == NS_OK && offlineOpRow)