From f662847ffe1cadb38a1d7f1c6422b1cca078a3d5 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Sat, 3 Jun 2000 22:23:10 +0000 Subject: [PATCH] fix problem with compound filters and doesn't contain terms r=alecf,a=scottip 41312 --- mailnews/base/search/src/nsMsgLocalSearch.cpp | 1 + mailnews/base/search/src/nsMsgSearchTerm.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mailnews/base/search/src/nsMsgLocalSearch.cpp b/mailnews/base/search/src/nsMsgLocalSearch.cpp index cc95e91063b..fe6bbe788b8 100644 --- a/mailnews/base/search/src/nsMsgLocalSearch.cpp +++ b/mailnews/base/search/src/nsMsgLocalSearch.cpp @@ -65,6 +65,7 @@ nsMsgSearchBoolExpression::nsMsgSearchBoolExpression (nsIMsgSearchTerm * newTerm m_term = newTerm; m_encodingStr = encodingStr; m_evalValue = evalValue; + m_boolOp = nsMsgSearchBooleanOp::BooleanAND; // this expression does not contain sub expressions m_leftChild = nsnull; diff --git a/mailnews/base/search/src/nsMsgSearchTerm.cpp b/mailnews/base/search/src/nsMsgSearchTerm.cpp index 9cc4bd820d9..bd164cb48e7 100644 --- a/mailnews/base/search/src/nsMsgSearchTerm.cpp +++ b/mailnews/base/search/src/nsMsgSearchTerm.cpp @@ -806,7 +806,7 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch, break; case nsMsgSearchOp::DoesntContain: if ((nsnull != n_header) && ((n_str.GetBuffer())[0]) && /* !INTL_StrContains(csid, n_header, n_str) */ - PL_strstr(stringToMatch, n_str)) + !PL_strstr(stringToMatch, n_str)) result = PR_TRUE; break; case nsMsgSearchOp::Is: @@ -1258,7 +1258,7 @@ NS_IMPL_ISUPPORTS1(nsMsgSearchScopeTerm, nsIMsgSearchScopeTerm) NS_IMETHODIMP nsMsgSearchScopeTerm::GetFileStream(nsIInputStream** aResult) { - *aResult = m_fileStream->GetIStream(); + *aResult = (m_fileStream) ? m_fileStream->GetIStream() : nsnull; NS_IF_ADDREF(*aResult); return NS_OK; }