patches/thunderbird3-18-fix-mimetype-for-helper-app.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 15302 bc58bbcf0a5b
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.

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);