fix tag loss with condstore servers, r=standard8, bug 678148
authorDavid Bienvenu <bienvenu@nventure.com>
Fri, 02 Sep 2011 07:55:18 -0700
changeset 8423 323fac96190381370103f4eac6b3dd827a994757
parent 8422 814036585e36191ce1540aeb86bc9821ddda33fc
child 8424 a5f596801e38a270bc9448566f537fd6ec58421b
push id6463
push userbienvenu@nventure.com
push dateFri, 02 Sep 2011 14:52:20 +0000
treeherdercomm-central@323fac961903 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8, bug
bugs678148
fix tag loss with condstore servers, r=standard8, bug 678148
mailnews/imap/src/nsImapServerResponseParser.cpp
--- a/mailnews/imap/src/nsImapServerResponseParser.cpp
+++ b/mailnews/imap/src/nsImapServerResponseParser.cpp
@@ -1716,17 +1716,17 @@ void nsImapServerResponseParser::flags()
     }
     if (!knownFlag && fFlagState)
     {
       nsCAutoString flag(fNextToken);
       PRInt32 parenIndex = flag.FindChar(')');
       if (parenIndex > 0)
         flag.SetLength(parenIndex);
       messageFlags |= kImapMsgCustomKeywordFlag;
-      if (CurrentResponseUID() != nsMsgKey_None)
+      if (CurrentResponseUID() != nsMsgKey_None && CurrentResponseUID() != 0)
         fFlagState->AddUidCustomFlagPair(CurrentResponseUID(), flag.get());
       else
         fCustomFlags.AppendElement(flag);
     }
     if (PL_strcasestr(fNextToken, ")"))
     {
       // eat token chars until we get the ')'
       while (*fNextToken != ')')