Bug 396477 - DM renames many files with double extension, e.g. filename.exe.exe. r=sdwilsh, a=mconnor
git-svn-id: svn://10.0.0.236/trunk@237081 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1e04ecb291
commit
e03da08d2c
@ -256,9 +256,13 @@ nsUnknownContentTypeDialog.prototype = {
|
||||
|
||||
this.makeFileUnique(aLocalFile);
|
||||
|
||||
if (aLocalFile.isExecutable() && !this.mLauncher.targetFile.isExecutable()) {
|
||||
// Append a file extension if it's an executable that doesn't have one
|
||||
let ext = "." + this.mLauncher.MIMEInfo.primaryExtension;
|
||||
let leaf = aLocalFile.leafName;
|
||||
if (aLocalFile.isExecutable() &&
|
||||
leaf.substring(leaf.length - ext.length) != ext) {
|
||||
var f = aLocalFile.clone();
|
||||
aLocalFile.leafName = aLocalFile.leafName + "." + this.mLauncher.MIMEInfo.primaryExtension;
|
||||
aLocalFile.leafName = leaf + ext;
|
||||
|
||||
f.remove(false);
|
||||
this.makeFileUnique(aLocalFile);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user