Bug 1500990 - Follow-up: fix eslint problems in download prefs. r=jorgk DONTBUILD
authoraceman <acelists@atlas.sk>
Mon, 03 Dec 2018 22:56:00 +0100
changeset 33847 c8d0feb240c6716537d6c0a6369bbc9f1246f671
parent 33846 b0cfc39adb1ed781b9f8975869517e35f35811de
child 33848 c454b0a4b6f3a058822ba8133c079ed0313d31b8
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1500990
Bug 1500990 - Follow-up: fix eslint problems in download prefs. r=jorgk DONTBUILD
mail/components/preferences/downloads.js
--- a/mail/components/preferences/downloads.js
+++ b/mail/components/preferences/downloads.js
@@ -1,14 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/Downloads.jsm");
+ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 
 var gDownloadDirSection = {
   async chooseFolder() {
     var fp = Cc["@mozilla.org/filepicker;1"]
                .createInstance(Ci.nsIFilePicker);
     var bundlePreferences = document.getElementById("bundlePreferences");
     var title = bundlePreferences.getString("chooseAttachmentsFolderTitle");
     fp.init(window, title, Ci.nsIFilePicker.modeGetFolder);
@@ -89,14 +90,9 @@ var gDownloadDirSection = {
     let urlSpec = Services.io.getProtocolHandler("file")
       .QueryInterface(Ci.nsIFileProtocolHandler)
       .getURLSpecFromFile(downloadDir);
 
     downloadFolder.style.backgroundImage = "url(moz-icon://" + urlSpec + "?size=16)";
 
     return undefined;
   },
-
-  async writeFolderList() {
-    var currentDirPref = document.getElementById("browser.download.downloadDir");
-    return await this._fileToIndex(currentDirPref.value);
-  },
 };