Reverted r2334 because the cause of the problem reported in issue 2078 seems to be different than initially thought.

This commit is contained in:
cketti 2010-09-09 23:57:38 +00:00
parent 8b9327c946
commit 4a3c205533
1 changed files with 1 additions and 24 deletions

View File

@ -924,30 +924,7 @@ public class ImapStore extends Store
{
if (ImapResponseParser.equalsIgnoreCase(response.get(0), "SEARCH"))
{
/*
* At least one server software decided it'd be a nice challenge for
* client implementations to return a message sequence number of 0 when
* no matches were found. So we're doing some sanity checks on the
* returned values before adding them to our message count.
*
* See issue 2078
*/
boolean invalidResponse = false;
for (int i = 1, length = response.size(); i < length; i++)
{
if ("0".equals(response.get(i)))
{
invalidResponse = true;
}
else
{
count++;
}
}
if (K9.DEBUG && invalidResponse)
{
Log.d(K9.LOG_TAG, "Invalid value found in SEARCH response.");
}
count += response.size() - 1;
}
}
return count;