Closed Bug 213882 Opened 22 years ago Closed 22 years ago

consider making aFileExt the primary extension if it is an extension

Categories

(Core Graveyard :: File Handling, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.5beta

People

(Reporter: Biesinger, Assigned: Biesinger)

References

Details

Attachments

(1 file)

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))"
*** Bug 213893 has been marked as a duplicate of this bug. ***
*** Bug 213892 has been marked as a duplicate of this bug. ***
*** Bug 213887 has been marked as a duplicate of this bug. ***
*** Bug 213883 has been marked as a duplicate of this bug. ***
*** Bug 213884 has been marked as a duplicate of this bug. ***
*** Bug 213885 has been marked as a duplicate of this bug. ***
*** Bug 213888 has been marked as a duplicate of this bug. ***
*** Bug 213889 has been marked as a duplicate of this bug. ***
*** Bug 213890 has been marked as a duplicate of this bug. ***
*** Bug 213891 has been marked as a duplicate of this bug. ***
Attachment #128523 - Flags: review?(bzbarsky)
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.5beta
Comment on attachment 128523 [details] [diff] [review] patch Looks good.
Attachment #128523 - Flags: review?(bzbarsky) → review+
Attachment #128523 - Flags: superreview?(darin)
how did all those duplicates get posted? :P
Attachment #128523 - Flags: superreview?(darin) → superreview+
Checking in nsExternalHelperAppService.cpp; /cvsroot/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp,v <-- nsExternalHelperAppService.cpp new revision: 1.206; previous revision: 1.205 done
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: