Re: How to convert path through container into standard form?

2022-12-11 Thread Sandor Szatmari via Cocoa-dev
I was thinking that’d break sandbox encapsulation. But I guess what really matters is what you get when you do the reverse and expand the tilde? > > On Dec 11, 2022, at 17:58, Ben Kennedy via Cocoa-dev > wrote: > >  > >> On 11 Dec 2022, at 12:51 pm, Mike Abdullah via Cocoa-dev >> wrote:

Re: How to convert path through container into standard form?

2022-12-11 Thread Ben Kennedy via Cocoa-dev
> On 11 Dec 2022, at 12:51 pm, Mike Abdullah via Cocoa-dev > wrote: > > Have you tried -URLByResolvingSymlinksInPath? As far as I’m aware, the > Pictures entry inside your container is a symlink to the real thing, so > assuming you have appropriate entitlements, should be possible to

Re: How to convert path through container into standard form?

2022-12-11 Thread Sandor Szatmari via Cocoa-dev
Looking back, I guess you’d bump up against the sandbox with this… > > On Dec 11, 2022, at 16:21, Sandor Szatmari > wrote: > > -stringByAbbreviatingWithTildeInPath > > First page in google results > >> On Dec 11, 2022, at 15:06, Gabriel Zachmann via Cocoa-dev >> wrote: >> >>  >> I

Re: How to convert path through container into standard form?

2022-12-11 Thread Sandor Szatmari via Cocoa-dev
-stringByAbbreviatingWithTildeInPath First page in google results > On Dec 11, 2022, at 15:06, Gabriel Zachmann via Cocoa-dev > wrote: > >  > I have an NSURL * pictures_path; > > By default, this is set to > > pictures_path = [ [NSFileManager defaultManager] URLForDirectory: >

Re: How to convert path through container into standard form?

2022-12-11 Thread Mike Abdullah via Cocoa-dev
Have you tried -URLByResolvingSymlinksInPath? As far as I’m aware, the Pictures entry inside your container is a symlink to the real thing, so assuming you have appropriate entitlements, should be possible to resolve it. Mike. > On 11 Dec 2022, at 10:56, Gabriel Zachmann via Cocoa-dev >

How to convert path through container into standard form?

2022-12-11 Thread Gabriel Zachmann via Cocoa-dev
I have an NSURL * pictures_path; By default, this is set to pictures_path = [ [NSFileManager defaultManager] URLForDirectory: NSPicturesDirectory inDomain: NSUserDomainMask appropriateForURL: nil create: NO