Closed Bug 312244 Opened 19 years ago Closed 19 years ago

+[NSURL urlFromWebloc:] uses an FSSpec when it doesn't need to.

Categories

(Camino Graveyard :: OS Integration, defect)

PowerPC
macOS
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: moz, Assigned: moz)

Details

(Keywords: fixed1.8)

Attachments

(1 file, 1 obsolete file)

No need for FSSpec when it can just be done with the FSRef we already have.
Patch right-quick.
Attached patch Patch! (obsolete) — Splinter Review
Comment on attachment 199362 [details] [diff] [review]
Patch!

>   
>-  if (inFile && !FSPathMakeRef((UInt8 *)[inFile fileSystemRepresentation], &ref, NULL) && !FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec, NULL)) {
>+  if (inFile && !FSPathMakeRef((UInt8 *)[inFile fileSystemRepresentation], &ref, NULL)) {
>     short resRef;

Change to (FSPathMakeRef(...) == noErr) and r=me.
Attachment #199362 - Flags: review+
Attached patch Patch mk2.Splinter Review
This patch uses an explicit comparison to noErr.
Attachment #199362 - Attachment is obsolete: true
Attachment #199363 - Flags: review?(sfraser_bugs)
Attachment #199363 - Flags: review?(sfraser_bugs) → review+
b&t
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: