Re: Root URL and URLByDeletingLastPathComponent

2016-07-18 Thread thatsanicehatyouhave
On Jul 18, 2016, at 7:37 AM, Mike Abdullah wrote: > 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 i

Re: Root URL and URLByDeletingLastPathComponent

2016-07-18 Thread Mike Abdullah
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

Re: Root URL and URLByDeletingLastPathComponent

2016-07-17 Thread Charles Srstka
> On Jul 17, 2016, at 5:30 AM, Mike Abdullah wrote: > > It might be a mishandling of the two sorts of rot URL. If you try feeding in > this URL manually: > > file://localhost/ > > and removing the last component, what do you end up with? import Foundation let url = NSURL(string: "file://loc

Re: Root URL and URLByDeletingLastPathComponent

2016-07-17 Thread Jens Alfke
> On Jul 17, 2016, at 6:49 AM, thatsanicehatyouh...@me.com wrote: > >> It might be a mishandling of the two sorts of rot URL. If you try feeding in >> this URL manually: >> >> file://localhost/ >> >> and removing the last component, what do you end up with? > > That just treats it as a file

Re: Root URL and URLByDeletingLastPathComponent

2016-07-17 Thread thatsanicehatyouhave
Hi, On Jul 17, 2016, at 6:30 AM, Mike Abdullah wrote: > It might be a mishandling of the two sorts of rot URL. If you try feeding in > this URL manually: > > file://localhost/ > > and removing the last component, what do you end up with? That just treats it as a file called "localhost" in th

Re: Root URL and URLByDeletingLastPathComponent

2016-07-17 Thread Mike Abdullah
> On 17 Jul 2016, at 07:48, thatsanicehatyouh...@me.com wrote: > > Hello, > > Sanity check here. I have this code: > > NSURL *rootURL = [NSURL fileURLWithPath:@"/"]; > NSLog(@"%@", rootURL, [rootURL URLByDeletingLastPathComponent]); > > Based on the NSURL documentation: > >> If the receiver’s

Root URL and URLByDeletingLastPathComponent

2016-07-16 Thread thatsanicehatyouhave
Hello, Sanity check here. I have this code: NSURL *rootURL = [NSURL fileURLWithPath:@"/"]; NSLog(@"%@", rootURL, [rootURL URLByDeletingLastPathComponent]); Based on the NSURL documentation: > If the receiver’s URL represents the root path, this property contains a copy > of the original URL.