зеркало из https://github.com/mozilla/pjs.git
Bug #168355 --> add capability of setting an array of search terms on a filter.
Don't assume we are saving to rules.dat, use the right leaf name for the final file when saving filters. r=navin sr=bienvenu
This commit is contained in:
Родитель
d22d1f297b
Коммит
4aa398e263
|
@ -219,6 +219,12 @@ NS_IMETHODIMP nsMsgFilter::GetSearchTerms(nsISupportsArray **aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgFilter::SetSearchTerms(nsISupportsArray *aSearchList)
|
||||
{
|
||||
m_termList = aSearchList;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgFilter::SetScope(nsIMsgSearchScopeTerm *aResult)
|
||||
{
|
||||
m_scope = aResult;
|
||||
|
|
|
@ -170,7 +170,13 @@ NS_IMETHODIMP nsMsgFilterService::SaveFilterList(nsIMsgFilterList *filterList, n
|
|||
nsXPIDLCString tmpFileName;
|
||||
tmpFiltersFile->GetLeafName(getter_Copies(tmpFileName));
|
||||
parentDir->AppendRelativeUnixPath(tmpFileName.get());
|
||||
parentDir->Rename("rules.dat");
|
||||
nsXPIDLCString finalLeafName;
|
||||
filterFile->GetLeafName(getter_Copies(finalLeafName));
|
||||
if (!finalLeafName.IsEmpty())
|
||||
parentDir->Rename(finalLeafName);
|
||||
else // fall back to rules.dat
|
||||
parentDir->Rename("rules.dat");
|
||||
|
||||
tmpFiltersFile->Delete(PR_FALSE);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче