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 <s...@rogue-research.com> 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                 s...@rogue-research.com
> Rogue Research                        www.rogue-research.com 
> Mac Software Developer              Montréal, Québec, Canada
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to