Commit 94414890 944148909c6751ccf6e5f223a7420fe721ff86bb by Sergey Poznyakoff

(imap_flags): Empty attribute list means MU_ATTRIBUTE_SEEN.

1 parent 2e38ebed
......@@ -1451,27 +1451,33 @@ imap_flags (char **ptr, int *pflags)
break;
/* Guess the flag. */
if (strncasecmp (start, "\\Seen", end - start) == 0)
{
flags |= MU_ATTRIBUTE_SEEN;
flags |= MU_ATTRIBUTE_READ;
}
else if (strncasecmp (start, "\\Answered", end - start) == 0)
{
flags |= MU_ATTRIBUTE_ANSWERED;
}
else if (strncasecmp (start, "\\Flagged", end - start) == 0)
{
flags |= MU_ATTRIBUTE_FLAGGED;
}
else if (strncasecmp (start, "\\Deleted", end - start) == 0)
{
flags |= MU_ATTRIBUTE_DELETED;
}
else if (strncasecmp (start, "\\Draft", end - start) == 0)
{
flags |= MU_ATTRIBUTE_DRAFT;
}
if (end == start)
flags |= MU_ATTRIBUTE_SEEN;
else
{
if (strncasecmp (start, "\\Seen", end - start) == 0)
{
flags |= MU_ATTRIBUTE_READ;
}
else if (strncasecmp (start, "\\Answered", end - start) == 0)
{
flags |= MU_ATTRIBUTE_ANSWERED;
}
else if (strncasecmp (start, "\\Flagged", end - start) == 0)
{
flags |= MU_ATTRIBUTE_FLAGGED;
}
else if (strncasecmp (start, "\\Deleted", end - start) == 0)
{
flags |= MU_ATTRIBUTE_DELETED;
}
else if (strncasecmp (start, "\\Draft", end - start) == 0)
{
flags |= MU_ATTRIBUTE_DRAFT;
}
else if (strncasecmp (start, "\\Recent", end - start))
flags |= MU_ATTRIBUTE_SEEN;
}
}
while (**ptr && **ptr != ')'); /* do {} */
......