17060
|
1 |
diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
|
2 |
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
|
3 |
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
|
4 |
@@ -1620,23 +1620,19 @@ nsOSHelperAppService::GetMIMEInfoFromOS(
|
|
5 |
PRBool hasDefault = PR_FALSE;
|
|
6 |
if (retval)
|
|
7 |
retval->GetHasDefaultHandler(&hasDefault);
|
|
8 |
if (!retval || !hasDefault) {
|
|
9 |
nsRefPtr<nsMIMEInfoBase> miByExt = GetFromExtension(PromiseFlatCString(aFileExt));
|
|
10 |
// If we had no extension match, but a type match, use that
|
|
11 |
if (!miByExt && retval)
|
|
12 |
return retval;
|
|
13 |
- // If we had an extension match but no type match, set the mimetype and use
|
|
14 |
- // it
|
|
15 |
+ // If we had an extension match but no type match, use it
|
|
16 |
if (!retval && miByExt) {
|
|
17 |
- if (!aType.IsEmpty())
|
|
18 |
- miByExt->SetMIMEType(aType);
|
|
19 |
miByExt.swap(retval);
|
|
20 |
-
|
|
21 |
return retval;
|
|
22 |
}
|
|
23 |
// If we got nothing, make a new mimeinfo
|
|
24 |
if (!retval) {
|
|
25 |
*aFound = PR_FALSE;
|
|
26 |
retval = new nsMIMEInfoUnix(aType);
|
|
27 |
if (retval) {
|
|
28 |
NS_ADDREF(retval);
|