patches/firefox3-07-fix-mimetype-for-helper-app.diff
author Jon Tibble <meths@btinternet.com>
Sat, 06 Oct 2012 16:11:50 +0100
branchs11express-2010-11
changeset 22109 db10202d5f6d
parent 17060 7620508144e5
permissions -rw-r--r--
Added tag oi_151a_prestable7 for changeset 25dee50cecca

diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
@@ -1620,23 +1620,19 @@ nsOSHelperAppService::GetMIMEInfoFromOS(
   PRBool hasDefault = PR_FALSE;
   if (retval)
     retval->GetHasDefaultHandler(&hasDefault);
   if (!retval || !hasDefault) {
     nsRefPtr<nsMIMEInfoBase> miByExt = GetFromExtension(PromiseFlatCString(aFileExt));
     // If we had no extension match, but a type match, use that
     if (!miByExt && retval)
       return retval;
-    // If we had an extension match but no type match, set the mimetype and use
-    // it
+    // If we had an extension match but no type match, use it
     if (!retval && miByExt) {
-      if (!aType.IsEmpty())
-        miByExt->SetMIMEType(aType);
       miByExt.swap(retval);
-
       return retval;
     }
     // If we got nothing, make a new mimeinfo
     if (!retval) {
       *aFound = PR_FALSE;
       retval = new nsMIMEInfoUnix(aType);
       if (retval) {
         NS_ADDREF(retval);