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

RESOLVED FIXED

Status

--
trivial
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: moz, Assigned: moz)

Tracking

({fixed1.8})

Details

Attachments

(1 attachment, 1 obsolete attachment)

874 bytes, patch
sfraser_bugs
: review+
Details | Diff | Splinter Review
(Assignee)

Description

13 years ago
No need for FSSpec when it can just be done with the FSRef we already have.
Patch right-quick.
(Assignee)

Comment 1

13 years ago
Created attachment 199362 [details] [diff] [review]
Patch!

Comment 2

13 years ago
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+
(Assignee)

Comment 3

13 years ago
Created attachment 199363 [details] [diff] [review]
Patch mk2.

This patch uses an explicit comparison to noErr.
Attachment #199362 - Attachment is obsolete: true
(Assignee)

Updated

13 years ago
Attachment #199363 - Flags: review?(sfraser_bugs)

Updated

13 years ago
Attachment #199363 - Flags: review?(sfraser_bugs) → review+

Comment 4

13 years ago
b&t
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.