Re: Root URL and URLByDeletingLastPathComponent
Re: Root URL and URLByDeletingLastPathComponent
- Subject: Re: Root URL and URLByDeletingLastPathComponent
- From: Mike Abdullah <email@hidden>
- Date: Mon, 18 Jul 2016 12:37:20 +0100
Fair enough, thanks! I would say then yes, it’s a mismatch between the docs and the implementation.
File a radar, but don’t expect the real-world behaviour to change, especially any time soon! It’s far more likely they will declare it to be a mistake in the docs and correct those.
Mike.
> On 17 Jul 2016, at 22:06, Charles Srstka <email@hidden> wrote:
>
>> On Jul 17, 2016, at 5:30 AM, Mike Abdullah <email@hidden <mailto:email@hidden>> wrote:
>>
>> It might be a mishandling of the two sorts of rot URL. If you try feeding in this URL manually:
>>
>> file://localhost/ <file:///>
>>
>> and removing the last component, what do you end up with?
>
> import Foundation
>
> let url = NSURL(string: "file://localhost/ <file:///>")!
> print(url.URLByDeletingLastPathComponent!)
>
> outputs:
>
> file://localhost/../ <file:///>
>
> Charles
>
_______________________________________________
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