Re: Trying to open a file
Re: Trying to open a file
- Subject: Re: Trying to open a file
- From: Ken Thomases <email@hidden>
- Date: Wed, 18 Feb 2009 03:10:20 -0600
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