Re: dropping alias file on NSPathControl with App Sandbox
Re: dropping alias file on NSPathControl with App Sandbox
- Subject: Re: dropping alias file on NSPathControl with App Sandbox
- From: Mike Abdullah <email@hidden>
- Date: Sat, 06 Oct 2012 10:59:46 +0100
Hi Sean,
Sandboxed apps can resolve aliases and follow symlinks, but unless the destination is within their sandbox already they do not gain access to it, sadly. I recommend filing a radar requesting this.
On 5 Oct 2012, at 20:40, Sean McBride <email@hidden> wrote:
> Hi all,
>
> NSOpenPanal takes care of resolving aliases/symlinks for you, which is important with App Sandbox since you want access to the target not the alias file itself.
>
> But NSPathControl, in its pathControl:acceptDrop: method, does not resolve the alias for you, and try as I may, I can't find a way to resolve it under App Sandbox. I get either:
>
> Error Domain=NSCocoaErrorDomain Code=4 "The file doesn’t exist."
> Error Domain=NSCocoaErrorDomain Code=259 "The file couldn’t be opened because it isn’t in the correct format."
>
> depending on the exact contortions.
>
> If the user granted my app access to an alias file, do I inherit access to its target? It seems not. As a programmer, I get that, but as a user, it seems counter to my intentions.
>
> Am I missing a way to resolve the alias, or is this an NSPathControl bug?
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng email@hidden
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
> _______________________________________________
>
> 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
_______________________________________________
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