need to flush custom headers to disk after we change them

VERIFIED FIXED in mozilla1.0

Status

SeaMonkey
MailNews: Message Display
VERIFIED FIXED
16 years ago
14 years ago

People

(Reporter: (not reading, please use seth@sspitzer.org instead), Assigned: (not reading, please use seth@sspitzer.org instead))

Tracking

({dataloss})

Trunk
mozilla1.0
x86
Windows 2000
dataloss

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

need to flush custom headers to disk after we change them.

here's one reason we need this:

you can change them, use them in filters, write the filters to disk, crash 
later (before prefs written to disk) and then start back up.

the mismatch between filters and the prefs can cause bad problems.

the fix is easy:

Index: base/search/resources/content/CustomHeaders.js
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/search/resources/content/CustomHeaders.
js,v
retrieving revision 1.2
diff -u -w -r1.2 CustomHeaders.js
--- base/search/resources/content/CustomHeaders.js      27 Oct 2001 05:35:23 -00
00      1.2
+++ base/search/resources/content/CustomHeaders.js      29 Mar 2002 05:56:13 -00
00
@@ -76,6 +76,8 @@
   {
     var hdrs = gArrayHdrs.join(": ");
     gPrefs.setCharPref("mailnews.customHeaders", hdrs);
+    // flush this pref change to disk
+    gPrefs.savePrefFile(null);
   }
   window.close();
 }
to reproduce this, change custom headers, crash (or kill) the application 
before we write prefs to disk.
Status: NEW → ASSIGNED
Keywords: dataloss, nsbeta1
QA Contact: olgam → laurel
Target Milestone: --- → mozilla1.0
Created attachment 76706 [details] [diff] [review]
real patch, that works.

Comment 3

16 years ago
Comment on attachment 76706 [details] [diff] [review]
real patch, that works.

ok, I got your point. 
good catch, r=naving
Attachment #76706 - Flags: review+

Comment 4

16 years ago
Comment on attachment 76706 [details] [diff] [review]
real patch, that works.

sr=bienvenu
Attachment #76706 - Flags: superreview+

Comment 5

16 years ago
Comment on attachment 76706 [details] [diff] [review]
real patch, that works.

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #76706 - Flags: approval+
fixed on 3/31/2002
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 7

16 years ago
OK using june5 commercial branch: win98, linux rh6.2, mac OS 9.2
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.