From 1134ea7082a786ce440332f6f16f16f7dec7bec2 Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Tue, 7 Oct 2003 06:06:44 +0000 Subject: [PATCH] Bug #221450 --> Helper App Dlg, Open Radio button always left blank for the birds. Fix by removing an obsolete API call to getDownloadInfo (Bug #218817). sr=ben --- .../mozapps/downloads/content/nsHelperAppDlg.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/toolkit/mozapps/downloads/content/nsHelperAppDlg.js b/toolkit/mozapps/downloads/content/nsHelperAppDlg.js index 346a7623dcee..c2180de3393e 100755 --- a/toolkit/mozapps/downloads/content/nsHelperAppDlg.js +++ b/toolkit/mozapps/downloads/content/nsHelperAppDlg.js @@ -36,7 +36,7 @@ # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # -# ***** END LICENSE BLOCK ***** +# ***** END LICENSE BLOCK ***** */ /* This file implements the nsIHelperAppLauncherDialog interface. @@ -377,7 +377,13 @@ nsUnknownContentTypeDialog.prototype = { var typeString = mimeInfo.Description; if (typeString == "") { - // 2. If there is none, use the extension to identify the file, e.g. "ZIP file" var primaryExtension = ""; try { primaryExtension = mimeInfo.primaryExtension; } catch (ex) { } + // 2. If there is none, use the extension to identify the file, e.g. "ZIP file" + var primaryExtension = ""; + try { + primaryExtension = mimeInfo.primaryExtension; + } + catch (ex) { + } if (primaryExtension != "") typeString = primaryExtension.toUpperCase() + " file"; // 3. If we can't even do that, just give up and show the MIME type. @@ -402,9 +408,7 @@ nsUnknownContentTypeDialog.prototype = { // in that case). // Need to get temporary file and check for executable-ness. - var ignore1 = new Object; - var ignore2 = new Object; - var tmpFile = this.mLauncher.getDownloadInfo( ignore1, ignore2 ); + var tmpFile = this.mLauncher.targetFile; // Default is Ok if the file isn't executable (and vice-versa). result = !tmpFile.isExecutable();