Closed Bug 134134 Opened 22 years ago Closed 22 years ago

need to flush custom headers to disk after we change them

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: sspitzer, Assigned: sspitzer)

Details

(Keywords: dataloss)

Attachments

(1 file)

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
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 on attachment 76706 [details] [diff] [review]
real patch, that works.

sr=bienvenu
Attachment #76706 - Flags: superreview+
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
Closed: 22 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: