+++ This bug was initially created as a clone of Bug #1108441 +++ [Step to reproduce] 1. In local Drafts folder, two draft mails. Delete mail, so it's not shown. messageKey=messageOffset=0, messageSize=SSSS, Subject=any Mail which is edited. messageKey=messageOffset=SSSS, messageSize=nnnn, Subject=Subject-000 2. Edit the draft of Subject=Subject-000 draftID=mailbox-message://.../Drafts#SSSS 3. Change Subject to Subject=Subject-001 4. Compact Drafts folder => Offset of Subject-000 is changed by Compact in Drafts. messageKey=messageOffset=0, messageSize=nnnn, Subject=Subject-000 5. Save as draft at Compser Window => In Drafts file, at Offset=nnnn, Subject-001 is writen with X-Mozilla-Keys: 0008 (<=deleted mail) New draft mail of Subject-001 is not shown at Thread Pane of Drfts folder. After Save, gmsgCompose.compFields.draftID = mailbox-message://.../Drafts#nnnn This is : (i). New draft of Subject-001 is appended to Offset=nnnn (ii). Try to delete editing draft set in draftID(messgeKey=SSSS) => Because mail of messgeKey=messageOffset=SSSS doesn't exist after Compact, error is returned to GetMsgDBHdrFromURI(draftID of key=SSSS). (iii). RemoveCurrentDraftMessage deletes newly saved draft mail at Offset=nnnn 6. Because newly appended mail to file named Drafts is deleted by Tb himself after "Save as draft", newly saved mail won't be kept if following occurs after it. 6-1. Compact 6-2. Change subject, and Save as draft 6-3. Repeat 6-1 and 6-2. Because above phenomenon happens upon each set of Compact/Save as draft, no new draft is saved. Only original of Subject-000 is available. This is caused by wrong assumption about error return code to "GetMsgDBHdrFromURI(curDraftIdURL.get(), getter_AddRefs(msgDBHdr)); " in RemoveCurrentDraftMessage(). > nsMsgComposeSendListener::RemoveCurrentDraftMessage > http://mxr.mozilla.org/comm-central/source/mailnews/compose/src/nsMsgCompose.cpp#3728 Note: Similar wrong assumption of "getting msgDBHdr for draftID failed == imap folder case" is seen in RemoveDraft() which is called upon Compser Window Close by user. > ComposeCanClose() > http://mxr.mozilla.org/comm-central/source/mail/components/compose/content/MsgComposeCommands.js#3315 > RemoveDraft() http://mxr.mozilla.org/comm-central/source/mail/components/compose/content/MsgComposeCommands.js#3402
Depends on: 854798
Above (i) /(ii-a) is phenomenon reported to bug 482836 comment #89. I don't know whether specific bug for such issue already exists or not.
(In reply to WADA from comment #2) > ... > Simplest and most effective solution is : Don't change messageKey by Compact > of local mail folder(Bug 854798) With Bug 854798 fixed in version 38, do we know if this bug is well and truly fixed?
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #4) > With Bug 854798 fixed in version 38, do we know if this bug is well and truly fixed? No. Even after fix of Bug 854798, this bug can occur by "Compact + Repait Folder" instead of "Compact only". Bug 854798 merely minimizes probability of that this bug happens in actual environment.
You need to log in before you can comment on or make changes to this bug.