[tor-commits] [torbirdy/master] Make sure we restore all preferences (closes #10588)

sukhbir at torproject.org sukhbir at torproject.org
Tue Feb 11 04:34:02 UTC 2014


commit 8b1538c35410c456afccc13335366652bd811aa2
Author: Sukhbir Singh <sukhbir at torproject.org>
Date:   Sat Jan 11 20:40:28 2014 -0500

    Make sure we restore all preferences (closes #10588)
---
 components/torbirdy.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/components/torbirdy.js b/components/torbirdy.js
index b12bd41..475dcde 100644
--- a/components/torbirdy.js
+++ b/components/torbirdy.js
@@ -449,7 +449,10 @@ TorBirdy.prototype = {
   setAccountPrefs: function() {
     if (this.prefs.getBoolPref("extensions.torbirdy.first_run")) {
       // Save the current proxy settings so that the settings can be restored in case
-      // TorBirdy is uninstalled or disabled. (TorBirdyOldPrefs)
+      // TorBirdy is uninstalled or disabled. (TorBirdyOldPrefs).
+      // First copy TorBirdyPrefs to TorBirdyOldPrefs.
+      TorBirdyOldPrefs.push.apply(TorBirdyOldPrefs, Object.keys(TorBirdyPrefs));
+
       for (var i = 0; i < TorBirdyOldPrefs.length; i++) {
         var oldPref = TorBirdyOldPrefs[i];
         var type = this.prefs.getPrefType(oldPref);





More information about the tor-commits mailing list