mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Confirm launch of executables other than .exe on Windows
This commit is contained in:
parent
86aabf8edd
commit
d1abf0f6d8
2 changed files with 24 additions and 15 deletions
|
|
@ -42,6 +42,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
|||
"resource://gre/modules/NetUtil.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
|
||||
"resource://gre/modules/PluralForm.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
|
||||
"resource://gre/modules/Downloads.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "DownloadUIHelper",
|
||||
|
|
@ -460,8 +462,12 @@ this.DownloadsCommon = {
|
|||
throw new Error("aOwnerWindow must be a dom-window object");
|
||||
}
|
||||
|
||||
let isWindowsExe = AppConstants.platform == "win" &&
|
||||
aFile.leafName.toLowerCase().endsWith(".exe");
|
||||
|
||||
let promiseShouldLaunch;
|
||||
if (aFile.isExecutable()) {
|
||||
// Don't prompt on Windows for .exe since there will be a native prompt.
|
||||
if (aFile.isExecutable() && !isWindowsExe) {
|
||||
// We get a prompter for the provided window here, even though anchoring
|
||||
// to the most recently active window should work as well.
|
||||
promiseShouldLaunch =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue