From 4f21694b305436a649b1782faebca3bd96569994 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Tue, 3 Dec 2002 03:38:10 +0000 Subject: [PATCH] fix losing delete changes on server that says there are no permanent flags, r/sr=sspitzer 182641 git-svn-id: svn://10.0.0.236/trunk@134661 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp b/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp index 792a24f84a3..38b80765ab7 100644 --- a/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp +++ b/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp @@ -1783,9 +1783,17 @@ void nsImapServerResponseParser::resp_text_code() } else if (!PL_strcasecmp(fNextToken,"PERMANENTFLAGS")) { + PRUint32 saveSettableFlags = fSettablePermanentFlags; fSupportsUserDefinedFlags = 0; // assume no unless told fSettablePermanentFlags = 0; // assume none, unless told otherwise. parse_folder_flags(); + // if the server tells us there are no permanent flags, we're + // just going to pretend that the FLAGS response flags, if any, are + // permanent in case the server is broken. This will allow us + // to store delete and seen flag changes - if they're not permanent, + // they're not permanent, but at least we'll try to set them. + if (!fSettablePermanentFlags) + fSettablePermanentFlags = saveSettableFlags; fGotPermanentFlags = PR_TRUE; } else if (!PL_strcasecmp(fNextToken,"READ-ONLY]"))