If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

consider making aFileExt the primary extension if it is an extension

VERIFIED DUPLICATE of bug 213882

Status

Core Graveyard
File Handling
VERIFIED DUPLICATE of bug 213882
14 years ago
a year 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: 14 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.