Re: document inexplicably becomes locked and fails to save under sandboxing
Re: document inexplicably becomes locked and fails to save under sandboxing
- Subject: Re: document inexplicably becomes locked and fails to save under sandboxing
- From: Sandy McGuffog <email@hidden>
- Date: Thu, 12 Jun 2014 22:28:37 +0200
I don’t know whether this is relevant to your issue, but for what it’s worth, (a) I have had a problem with OS X mysteriously locking files as result of the file being set to "user immutable”, and (b) I know that the autosave functionality in NSDocument interacts with the immutable setting.
In my case, the solution was just to do:
[path setResourceValue:[NSNumber numberWithBool:NO] forKey:NSURLIsUserImmutableKey error:nil];
Sandy
On Jun 12, 2014, at 10:11 PM, Martin Wierschin <email@hidden> wrote:
>> I need to do some more testing, but I may have a workaround for my problem. Instead of opening the document via NSDocumentController, ask NSWorkspace to open the file in my app instead
>
> I spoke too soon. Reopening the document via NSWorkspace also has the same problem: the sandbox will eventually show the document as locked and/or deny the user access to the file.
>
> Filed as radar://17291335
>
> This is a huge problem for our app, so if anyone has any other tips, I'd be very appreciative.
>
> Thank you,
> ~Martin Wierschin
>
>
> _______________________________________________
>
> 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