From 8aca2d88e45e98b4001eae7ccec3456c365d8fbd Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Mon, 31 Jul 2006 21:59:02 +0000 Subject: [PATCH] fix 346378, renaming favorite folder twice loses favorite folder status, sr=mscott git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@206215 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/local/src/nsLocalMailFolder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp index 1a689095322..e8f788f7272 100644 --- a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp @@ -1242,6 +1242,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rename(const PRUnichar *aNewName, nsIMsgWind if (cnt > 0) newFolder->RenameSubFolders(msgWindow, this); + // save folder flags, because PropagateDelete will clear them. + PRUint32 saveFolderFlags = mFlags; if (parentFolder) { SetParent(nsnull); @@ -1250,6 +1252,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rename(const PRUnichar *aNewName, nsIMsgWind } SetPath(nsnull); // forget our path, since this folder object renamed itself folderRenameAtom = do_GetAtom("RenameCompleted"); + // restore saved folder flags, after PropagateDelete cleared them. + newFolder->SetFlags(saveFolderFlags); newFolder->NotifyFolderEvent(folderRenameAtom); } }