Re: Saving an NSDocument safely
Re: Saving an NSDocument safely
- Subject: Re: Saving an NSDocument safely
- From: "Adam R. Maxwell" <email@hidden>
- Date: Fri, 11 Jan 2008 14:16:02 -0800
On Friday, January 11, 2008, at 02:06PM, "Kyle Sluder" <email@hidden> wrote:
>On Jan 11, 2008 11:24 AM, Adam R. Maxwell <email@hidden> wrote:
>> Yes, the framework does this in -[NSDocument writeSafelyToURL:..].
>> Using FSExchangeObjects doesn't result in the problem the OP mentions,
>> but the temp file and destination file have to reside on the same
>> volume. I had to write my own implementation of writeSafelyToURL:
>> yesterday since 10.5's safe saving is broken.
>
>Please do elaborate. This is important to one of my projects, and I
>haven't experienced any issues with safe saving on 10.5.
http://www.cocoabuilder.com/search/archive/cocoa?words=FSPathReplaceObject
In our case, this appears related to extended attributes on AFP volumes. I came up with a workaround that's now used as a fallback if we're on Leopard and NSDocument fails to save the file, but I'm not very enthusiastic about this. E-mail offlist and I'll send a link to the code (BSD license).
--
adam
_______________________________________________
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