diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-02 17:51:09 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-02 17:51:09 +0200 |
commit | 4c9914227ed9e675d65ad16e0bb899e8107a0ee5 (patch) | |
tree | d4c542f51b5155eb3f3627c628686cfc0d648a2f /application | |
parent | de01f1e7fce43d5919e6adcd73dfa617a9087520 (diff) | |
parent | aa6329b694a981dccd5b0fd124936c4b54fb94a4 (diff) | |
download | UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.gz UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.lz UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.xz UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.zip |
Merge branch 'ported-upstream'
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/components/downloads/DownloadsCommon.jsm | 22 | ||||
-rw-r--r-- | application/palemoon/components/downloads/moz.build | 7 |
2 files changed, 15 insertions, 14 deletions
diff --git a/application/palemoon/components/downloads/DownloadsCommon.jsm b/application/palemoon/components/downloads/DownloadsCommon.jsm index c6614e780..156578572 100644 --- a/application/palemoon/components/downloads/DownloadsCommon.jsm +++ b/application/palemoon/components/downloads/DownloadsCommon.jsm @@ -77,7 +77,6 @@ const nsIDM = Ci.nsIDownloadManager; const kDownloadsStringBundleUrl = "chrome://browser/locale/downloads/downloads.properties"; -const kPrefBdmScanWhenDone = "browser.download.manager.scanWhenDone"; const kPrefBdmAlertOnExeOpen = "browser.download.manager.alertOnEXEOpen"; const kDownloadsStringsRequiringFormatting = { @@ -518,23 +517,22 @@ this.DownloadsCommon = { if (!(aOwnerWindow instanceof Ci.nsIDOMWindow)) throw new Error("aOwnerWindow must be a dom-window object"); +#ifdef XP_WIN + // On Windows, the system will provide a native confirmation prompt + // for .exe files. Exclude this from our prompt, but prompt on other + // executable types. + let isWindowsExe = aFile.leafName.toLowerCase().endsWith(".exe"); +#else + let isWindowsExe = false; +#endif + // Confirm opening executable files if required. - if (aFile.isExecutable()) { + if (aFile.isExecutable() && !isWindowsExe) { let showAlert = true; try { showAlert = Services.prefs.getBoolPref(kPrefBdmAlertOnExeOpen); } catch (ex) { } - // On Vista and above, we rely on native security prompting for - // downloaded content unless it's disabled. - if (DownloadsCommon.isWinVistaOrHigher) { - try { - if (Services.prefs.getBoolPref(kPrefBdmScanWhenDone)) { - showAlert = false; - } - } catch (ex) { } - } - if (showAlert) { let name = aFile.leafName; let message = diff --git a/application/palemoon/components/downloads/moz.build b/application/palemoon/components/downloads/moz.build index 3bebfd6d1..61d8c0f62 100644 --- a/application/palemoon/components/downloads/moz.build +++ b/application/palemoon/components/downloads/moz.build @@ -13,7 +13,10 @@ EXTRA_COMPONENTS += [ ] EXTRA_JS_MODULES += [ - 'DownloadsCommon.jsm', 'DownloadsLogger.jsm', 'DownloadsTaskbar.jsm', -]
\ No newline at end of file +] + +EXTRA_PP_JS_MODULES += [ + 'DownloadsCommon.jsm', +] |