fix Keep Only Unread messages when no other purge criteria is set, 168743 r/sr=mscott

This commit is contained in:
bienvenu%nventure.com 2003-07-22 21:22:23 +00:00
Родитель c2f7b05ea2
Коммит 9f8a9bab94
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -4134,6 +4134,12 @@ NS_IMETHODIMP nsMsgDatabase::ApplyRetentionSettings(nsIMsgRetentionSettings *msg
switch (retainByPreference) switch (retainByPreference)
{ {
case nsIMsgRetentionSettings::nsMsgRetainAll: case nsIMsgRetentionSettings::nsMsgRetainAll:
if (keepUnreadMessagesOnly && m_mdbAllMsgHeadersTable)
{
mdb_count numHdrs = 0;
m_mdbAllMsgHeadersTable->GetCount(GetEnv(), &numHdrs);
return PurgeExcessMessages(numHdrs, PR_TRUE);
}
break; break;
case nsIMsgRetentionSettings::nsMsgRetainByAge: case nsIMsgRetentionSettings::nsMsgRetainByAge:
msgRetentionSettings->GetDaysToKeepHdrs(&daysToKeepHdrs); msgRetentionSettings->GetDaysToKeepHdrs(&daysToKeepHdrs);