Closed Bug 195142 Opened 23 years ago Closed 22 years ago

Canceling a move to trash permanently deletes mailbox

Categories

(MailNews Core :: Backend, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.4final

People

(Reporter: waldemar, Assigned: sspitzer)

Details

(Keywords: dataloss, Whiteboard: [fixed on trunk and branch][need some spin off bugs])

Attachments

(1 file)

Turn off "Confirm when moving folders to the Trash" in the preferences. Create a mail folder with named F in the mail account. Create a subfolder Alpha inside F and move some mail there. Create a subfolder Beta inside F and move some mail there. Create a mail filter rule that targets Alpha. Now move F into the trash (which I did by accident a while back). The browser comes back with the dialog: "Deleting the folder 'Alpha' will disable its associated filter(s). Are you sure you want to delete the folder?" Click Cancel. F and Beta will be moved into the trash. Alpha, and all of its contained mail will be gone and unrecoverable. This is a major data loss. Had I clicked OK, F, Alpha, and Beta would have been moved into the trash, and I would have been able to look at their messages but unable to move them out of there (a folder already exists alert would come up even though none is visible) unless I went inside Library/Mozilla/Profiles/waldemar/<my salt>/Mail and deleted an extraneous copy of the F folder.
not a mail database (.msf file) issue. these are presumably local mail folders and not imap folders.
Assignee: bienvenu → sspitzer
Component: Mail Database → Mail Back End
This is a POP mailbox.
Flags: blocking1.3?
not likely to happen in time for 1.3
Flags: blocking1.3? → blocking1.3-
Flags: blocking1.4a?
Flags: blocking1.4a? → blocking1.4a-
Severity: major → critical
Flags: blocking1.4?
Keywords: mozilla1.3nsbeta1
adt: nsbeta1-
Keywords: nsbeta1nsbeta1-
I'm going to look around bugzilla. Waldemar, is this 100% reproducible? Are those the exact conditions required to reproduce.
Yes, it's 100% reproducible using today's trunk Mozilla build and the steps provided in the initial bug report. I lost several mailboxes full of mail due to this bug.
Is this a regression? Could someone please check to see if it occurs on 1.2, 1.1, etc? TIA.
I tried this several times and didn't have a problem. Either there's something special about Waldemar's setup, or I didn't quite follow the steps correctly (though I think I did). Perhaps someone else could try this. Was the trash folder on the same local account?
Yes, the trash was on the same local account. I can reproduce this bug even with a brand new profile. Are you using POP mail? I haven't tried this with IMAP.
Yes, my tests were with local folders.
Do you mean folders in the "Local Folders" folder, or folders stored locally on the machine but part of a POP account? I was using the latter. What machine/os are you using? What did you do to try to reproduce this bug and what happened?
I am able to reproduce this consistently using Linux trunk build 20030515 with the steps in comment 0. It also occurs with release builds back to 1.0. It occurs with POP folders as well as Local folders.
OS: MacOS X → All
Hardware: Macintosh → All
I tried this on Linux as well - it worked fine. I'll try it under Purify, and look at the code to see if maybe there's some sort of uninitialized variable.
Attached patch patchSplinter Review
there are two bugs here. this fixes the dataloss 1. the |copyStatus| for Alpha (which failed because the user hit cancel) is clobbered by the |copyStatus| for Beta which succeeds. This patch fixes this by bailing from the subfolder loop immeadiately when CopyFolderLocal fails. 2. the folder F is still "copied" to trash (it happens before the filter/confirmation dialog). if the filter had been on folder Beta, Alpha would be "copied" to trash. The trash folder is not updated when this happens. You have to open a new window (double-click on trash).
Comment on attachment 123550 [details] [diff] [review] patch sr=bienvenu - that makes sense. In theory, we should be pre-flighting the whole thing correctly, but the fix looks fine to me.
Attachment #123550 - Flags: superreview+
Attachment #123550 - Flags: review?(sspitzer)
Comment on attachment 123550 [details] [diff] [review] patch r/a=sspitzer, I'll land this.
Attachment #123550 - Flags: review?(sspitzer)
Attachment #123550 - Flags: review+
Attachment #123550 - Flags: approval1.4+
whoops, I forgot to land this. I'll land today.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.4final
Yeah, we want this for 1.4.
fixed landed on trunk and branch, but we need spin off bugs on the other issues.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Keywords: fixed1.4
Resolution: --- → FIXED
Whiteboard: [fixed on trunk and branch][need some spin off bugs]
Trunk build 2003-06-03: WinMe, Mac 10.1.5, Linux RH 8 - ok. Branch build 2003-03-03: WinMe, Mac 10.1.5, Linux RH 8 - ok. Verified Fixed. Tests performed: 1st Scenario a. Created a top level folder F b. Created two subfolders for "F" (alpha, beta) c. Created filter for alpha d. Drag-n-dropped folder F to the trash folder Actual Results: Responded Yes to move the "F" folder to trash, then Canceled the next dialog which warns that the filter for alpha will be disabled. The current window shows no change in the folder "F" hierarchy. Need to log bug for this issue: Double click so it appears in a new window. The folder "F" directory structure is there with alpha and beta as subfolders but flder "F" is also in the Trash folder which is a bug. Trash F F alpha beta Scenario 2 a. Created a top level folder G b. Created two subfolders for "F" (alpha2, beta2) c. Created filter for beta2 d. Drag-n-dropped folder G to the trash folder Responded Yes to move the "G" folder to trash, then Canceled the next dialog which warns that the filter for beta2 will be disabled. The current window shows no change in the folder "G" hierarchy. Need to log bug for this issue: Double click so it appears in a new window. The folder "G" directory structure is there with alpha2 and beta2 as subfolders but flder "G" and alpha2 are also in the Trash folder which is a bug. Are there any other issues that need to be logged?
Status: RESOLVED → VERIFIED
Keywords: fixed1.4verified1.4
QA Contact: esther → nbaca
mozilla1.4 shipped. unsetting blocking1.4 request.
Flags: blocking1.4?
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: