Bug 1470729 - Fix JS reference error in converterDialog.js. r=me a=jorgk BETA_60_CONTINUATION
authorJorg K <jorgk@jorgk.com>
Mon, 25 Jun 2018 13:14:51 +0200
branchBETA_60_CONTINUATION
changeset 32016 f06066471eae
parent 32015 30ecc44d5bf4
child 32017 b13c03b7342b
push id384
push userclokep@gmail.com
push dateTue, 26 Jun 2018 01:38:29 +0000
reviewersme, jorgk
bugs1470729
Bug 1470729 - Fix JS reference error in converterDialog.js. r=me a=jorgk
mailnews/base/prefs/content/converterDialog.js
--- a/mailnews/base/prefs/content/converterDialog.js
+++ b/mailnews/base/prefs/content/converterDialog.js
@@ -200,18 +200,17 @@ function startContinue(aSelectedStoreTyp
   let originalStoreContractID = Services.prefs.getCharPref(p5);
   let originalRootFolderPath = gServer.rootFolder.filePath.path;
 
   /**
    * Called when promise returned by convertMailStoreTo() is rejected.
    * @param {String} aReason - error because of which the promise was rejected.
    */
   function promiseRejected(aReason){
-    log.error("Conversion to '" + mailstoreContractId + "' failed: " +
-      aReason);
+    log.error("Conversion to '" + aSelectedStoreType + "' failed: " + aReason);
     document.getElementById("messageSpan").style.display = "none";
 
     document.getElementById("errorSpan").style.display = "block";
       gResponse.newRootFolder = null;
 
     // Revert prefs.
     Services.prefs.setCharPref(p1, originalDirectoryPref);
     Services.prefs.setCharPref(p2, originalDirectoryRelPref);
@@ -227,25 +226,24 @@ function startContinue(aSelectedStoreTyp
   }
 
   /**
    * Called when promise returned by convertMailStoreTo() is resolved.
    * @param {String} aVal - path of the new account root folder with which the
    * promise returned by convertMailStoreTo() is resolved.
    */
   function promiseResolved(aVal) {
-    let newMailstoreContractId = aSelectedStoreType;
-    log.info("Converted to '" + newMailstoreContractId + "' - " + aVal);
+    log.info("Converted to '" + aSelectedStoreType + "' - " + aVal);
 
     gResponse.newRootFolder = aVal;
     for (let deferredAccount of gDeferredAccounts) {
       let defServer = deferredAccount.incomingServer;
       defServer.rootMsgFolder.filePath = new FileUtils.File(aVal);
       Services.prefs.setCharPref("mail.server." + defServer.key +
-        ".storeContractID", newMailstoreContractId);
+        ".storeContractID", aSelectedStoreType);
     }
 
     Services.io.offline = gOriginalOffline;
     document.getElementById("cancel").style.display = "none";
     document.getElementById("finish").style.display = "inline-block";
     document.getElementById("messageSpan").style.display = "none";
     document.getElementById("completeSpan").style.display = "block";
   }