Re: How to ResolvingSymlinksInPath ?

2016-11-04 Thread Charles Srstka
> On Nov 3, 2016, at 10:39 PM, Ken Thomases wrote: > > On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann > wrote: >> >> URLByResolvingAliasFileAtURL does almost the same, has no special behaviour >> with “/private”, and

Re: How to ResolvingSymlinksInPath ?

2016-11-04 Thread Charles Srstka
> On Nov 3, 2016, at 10:39 PM, Ken Thomases wrote: > > On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann > wrote: >> >> URLByResolvingAliasFileAtURL does almost the same, has no special behaviour >> with “/private”, and

Re: How to ResolvingSymlinksInPath ?

2016-11-03 Thread Gerriet M. Denkmann
> On 4 Nov 2016, at 10:39, Ken Thomases wrote: > > On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann wrote: >> >> URLByResolvingAliasFileAtURL does almost the same, has no special behaviour >> with “/private”, and even can resolve an alias. >> But:

Re: How to ResolvingSymlinksInPath ?

2016-11-03 Thread Ken Thomases
On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann wrote: > > URLByResolvingAliasFileAtURL does almost the same, has no special behaviour > with “/private”, and even can resolve an alias. > But: only when this alias is the final component of a path. > I.e. /path/aliasToFoo

Re: How to ResolvingSymlinksInPath ?

2016-11-03 Thread Gerriet M. Denkmann
> On 3 Nov 2016, at 23:05, Jens Alfke wrote: > > The docs for -stringByResolvingSymlinksInPath say that “for absolute paths, > all symbolic links are guaranteed to be removed.” If it doesn’t actually do > that, then there’s either a bug in the implementation or a bug in

Re: How to ResolvingSymlinksInPath ?

2016-11-03 Thread Jens Alfke
The docs for -stringByResolvingSymlinksInPath say that “for absolute paths, all symbolic links are guaranteed to be removed.” If it doesn’t actually do that, then there's either a bug in the implementation or a bug in the docs; either way, you should file a Radar. (I’m not sure why you need to

Re: How to ResolvingSymlinksInPath ?

2016-11-03 Thread Gerriet M. Denkmann
> On 2 Nov 2016, at 20:40, Stephane Sudre wrote: > > https://www.cocoawithlove.com/2010/02/resolving-path-containing-mixture-of.html I finally came up with this (all error checking removed): - (NSString *)resolvedPathFor: (NSString *)rawPath { NSURL *url = [

How to ResolvingSymlinksInPath ?

2016-11-02 Thread Gerriet M. Denkmann
I want to remove all symlinks from a path. stringByResolvingSymlinksInPath does NOT do this (e.g. it does not change: /tmp to: /private/tmp). Currently I am using: int fd = open( filename, O_EVTONLY ); fcntl( fd, F_GETPATH, buffer ); close(fd); Is there something better or more suitable?