зеркало из https://github.com/mozilla/pjs.git
Bug #217405 --> New helper app dialog causes JS exception for unknown content types
r=ben
This commit is contained in:
Родитель
94c4eaac54
Коммит
786efddbcf
|
@ -377,9 +377,16 @@ nsUnknownContentTypeDialog.prototype = {
|
|||
var typeString = mimeInfo.Description;
|
||||
|
||||
if (typeString == "") {
|
||||
// 2. If there is none, use the extension to identify the file, e.g. "ZIP file"
|
||||
if (mimeInfo.primaryExtension != "")
|
||||
typeString = mimeInfo.primaryExtension.toUpperCase() + " file";
|
||||
// 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.
|
||||
else
|
||||
typeString = mimeInfo.MIMEType;
|
||||
|
|
Загрузка…
Ссылка в новой задаче