Skip navigation.
 
mlRe: Saving an NSDocument safely
FROM : Adam R. Maxwell
DATE : Fri Jan 11 23:16:02 2008

On Friday, January 11, 2008, at 02:06PM, "Kyle Sluder" <kyle.<email_removed>> wrote:
>On Jan 11, 2008 11:24 AM, Adam R. Maxwell <<email_removed>> 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

Related mailsAuthorDate
mlSaving an NSDocument safely Thomas Thiriez Jan 11, 11:47
mlRe: Saving an NSDocument safely Alastair Houghton Jan 11, 15:57
mlRe: Saving an NSDocument safely Adam R. Maxwell Jan 11, 17:24
mlRe: Saving an NSDocument safely Adam R. Maxwell Jan 11, 23:16