consider making aFileExt the primary extension if it is an extension

VERIFIED DUPLICATE of bug 213882

Status

VERIFIED DUPLICATE of bug 213882
16 years ago
2 years ago

People

(Reporter: Biesinger, Assigned: Biesinger)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

bz mentioned this in bug 147679 comment 41:
"Do we want to list anything here as far as the return value?  Like
that we guarantee the return value will have [...] aFileExt as the
primaryExtension if that's a valid
extension for aMIMEType?"

After thinking about this some, and seeing the callers, I agree that this would
be a good idea.

This would basically include moving this code:
  PRBool matches = PR_FALSE;
  if (!fileExtension.IsEmpty()) {
    mimeInfo->ExtensionExists(fileExtension.get(), &matches);
  }
  if (matches) {
    mimeInfo->SetPrimaryExtension(fileExtension.get());
  }
from nsExternalHelperAppService::DoContent to GetFromTypeAndExtension

and it would allow changing that part of the code in DoContent to just
"mimeInfo->GetPrimaryExtension(getter_Copies(fileExtension))"

*** This bug has been marked as a duplicate of 213882 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
v
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.