Re: Sandboxing die.die.die
Re: Sandboxing die.die.die
- Subject: Re: Sandboxing die.die.die
- From: Graham Cox <email@hidden>
- Date: Fri, 24 Aug 2012 10:41:30 +1000
On 24/08/2012, at 10:11 AM, Kyle Sluder <email@hidden> wrote:
> Just FYI, this is not a valid URL. The space in "iPhoto Library" needs
> to be percent-encoded.
It is, in fact. I retyped it in Mail.
>> So I think I'm correct to be using [NSURL URLWithString:] here (tell me
>> if that's not right!) and that does point to the right file and
>> everything is now working.
>
> In general, no. You should not use +URLWithString: to create an NSURL
> from a filesystem path. Use +fileURLWithPath:isDirectory: instead. It
> handles cases like percent-encoding.
Hang on, given the above string (which as far as I can tell is a 'proper' URL and not just a path), +URLWithString works fine and +fileURLWithPath:isDirectory makes a complete hash of it.
What is +URLWithString: for, if not this?
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden