Closed Bug 166411 Opened 24 years ago Closed 24 years ago

Copying msgs to local folders with invalid db's causes corruption

Categories

(MailNews Core :: Backend, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: naving, Assigned: naving)

Details

Attachments

(1 file)

Status: NEW → ASSIGNED
Summary: Copying msgs to folders with invalid db's causes corruption → Copying msgs to local folders with invalid db's causes corruption
Attached patch proposed fixSplinter Review
The fix is to call GetDatabaseWOReparse where we don't want parsing to be kicked off because we are in middle of writing to folder and GetDatabase does that. I have removed rv in certain places because it was same as checking whether we got db and it was causing bad things to happen because it was getting propagated. Also I have made it so that undo is not done here because we were never able to copy the hdr to destination folder. I have tested for news, imap, local --> local and also compose save as draft and send.
Cavin, David. Can I get reviews ? thx.
looks fine, just a couple nits about the comments: //null out the transaction because we can't undo w/o the msg db and you should say why you're blowing off the error return in GetMsgDatabaseWOReparse().
Comment on attachment 98185 [details] [diff] [review] proposed fix sr=bienvenu
Attachment #98185 - Flags: superreview+
Comment on attachment 98185 [details] [diff] [review] proposed fix r=cavin.
Attachment #98185 - Flags: review+
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA Contact: gayatri → esther
Navin, how can I create a local folder with an invalid db?
QA Contact: esther → gchan
To create an invalid db, just save the .msf file using explorer so that timestamps of berkeley mailbox and msf file are no longer same or you can delete the .msf file altogether.
commerical 2003-01-02-05-trunk Xp 2003-01-02-08-trunk Mac OS 10.1.2, linux 2.2 I removed various *.msf folder files under Local folders (new folder, Unsent, Drafts, templates, Sent) and tried coping megs, creating drafts,templates, or unsent mesgs. And there was no problem saving/copying/moving mesgs to any folder under Local Folders when the *.msf file was removed. I was able to view all mesgs in the Local folders and edit/send various drafts/templates. marking as verified.
Status: RESOLVED → VERIFIED
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: