diff options
author | Moonchild <moonchild@palemoon.org> | 2020-12-15 15:09:30 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-12-15 15:09:30 +0000 |
commit | dabdec3b3ae9cd920e9fe75622a10ce290552941 (patch) | |
tree | 4d462fe7a5f314369f373f6a42214bc9c0efbfcb /toolkit/components/jsdownloads/src/DownloadIntegration.jsm | |
parent | 5165ed02285315cc0bed7977c7bac6d0a90ca43c (diff) | |
parent | cd17592001225e2d988c3aca9bd700de3c8ce4a3 (diff) | |
download | UXP-b55123d5fe3d81850e60b42b5f4e129f51d4775c.tar UXP-b55123d5fe3d81850e60b42b5f4e129f51d4775c.tar.gz UXP-b55123d5fe3d81850e60b42b5f4e129f51d4775c.tar.lz UXP-b55123d5fe3d81850e60b42b5f4e129f51d4775c.tar.xz UXP-b55123d5fe3d81850e60b42b5f4e129f51d4775c.zip |
Merge branch 'redwood' into releaseRC_20201215
Diffstat (limited to 'toolkit/components/jsdownloads/src/DownloadIntegration.jsm')
-rw-r--r-- | toolkit/components/jsdownloads/src/DownloadIntegration.jsm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm index 7656128d2..ce525d4aa 100644 --- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm +++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm @@ -718,6 +718,22 @@ this.DownloadIntegration = { return; } +#ifdef XP_WIN + // When a file has no extension, and there's an executable file with the + // same name in the same folder, the Windows shell can get confused. + // For this reason, we show the file in the containing folder instead of + // trying to open it. + // We also don't trust mimeinfo; it could be a type we can forward to a + // system handler, but it could also be an executable type, and we + // don't have an exhaustive list with all of them. + if (!fileExtension) { + // We can't check for the existence of a same-name file with every + // possible executable extension, so this is a catch-all. + this.showContainingDirectory(aDownload.target.path); + return; + } +#endif + // No custom application chosen, let's launch the file with the default // handler. First, let's try to launch it through the MIME service. if (mimeInfo) { |