Re: Trying to open a file
Re: Trying to open a file
- Subject: Re: Trying to open a file
- From: Christian Graus <email@hidden>
- Date: Wed, 18 Feb 2009 20:41:38 +1100
Ah - thanks for the explanation, I bet that's why it worked for me before
and not later when the path I selected, changed. The space will be it, this
code worked 4 days ago and I've not done any updates.
On Wed, Feb 18, 2009 at 8:10 PM, Ken Thomases <email@hidden> wrote:
> On Feb 18, 2009, at 1:15 AM, Christian Graus wrote:
>
> I will look to see what fileURLWithPath returns tho, b/c the string is the
>> same as it was the last time I ran this, but last time it worked ( the
>> code
>> has not changed, so I am mystified )
>>
>
> It may have worked, but it is not a generally correct thing to do. A file
> path may contain characters that a URL may not, like a space. So, taking a
> file path and prepending file:// does not necessarily make it a valid URL
> string.
>
> It may be that an update to the system frameworks tightened up the
> validation of URL strings passed to -[NSURL initWithString:], causing
> something which used to work to now fail. Such validation tightening is
> typical of security updates.
>
> Cheers,
> Ken
>
>
_______________________________________________
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