Bug 398551 - Cannot download tar.gz or tar.bz2 files from the "Open with" dialog. r=gavin.sharp, b-ff3=beltzner, a=b-ff3 M9
git-svn-id: svn://10.0.0.236/trunk@237963 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
09777fb442
commit
3112a93685
@ -257,17 +257,25 @@ nsUnknownContentTypeDialog.prototype = {
|
||||
|
||||
this.makeFileUnique(aLocalFile);
|
||||
|
||||
#ifdef XP_WIN
|
||||
let ext;
|
||||
try {
|
||||
// We can fail here if there's no primary extension set
|
||||
ext = "." + this.mLauncher.MIMEInfo.primaryExtension;
|
||||
} catch (e) { }
|
||||
|
||||
// Append a file extension if it's an executable that doesn't have one
|
||||
let ext = "." + this.mLauncher.MIMEInfo.primaryExtension;
|
||||
// but make sure we actually have an extension to add
|
||||
let leaf = aLocalFile.leafName;
|
||||
if (aLocalFile.isExecutable() &&
|
||||
if (aLocalFile.isExecutable() && ext &&
|
||||
leaf.substring(leaf.length - ext.length) != ext) {
|
||||
var f = aLocalFile.clone();
|
||||
let f = aLocalFile.clone();
|
||||
aLocalFile.leafName = leaf + ext;
|
||||
|
||||
f.remove(false);
|
||||
this.makeFileUnique(aLocalFile);
|
||||
}
|
||||
#endif
|
||||
|
||||
return aLocalFile;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user