On Mar 3, 2012, at 8:23 PM, Graham Cox wrote: > … Unfortunately on Lion, the autosave feature overwrites the original file, > destroying it, and replacing it with our native format, but with the wrong > extension (it has the original extension). > > Shouldn't setting the role to 'viewer' prevent this?
Based on my understand of CFBundleTypeRole, it should definitely not autosave on top of the original file. Sounds like a bug to me too. > Otherwise what should I be doing to avoid this annoying problem? I don't have a solution for you, but I *thought* that NSDocumentController's new makeDocumentForURL:withContentsOfURL:ofType:error:, passing nil for the first parameter would have been a solution. It turns out that as soon as the document is closed, the original file is deleted. Not that it's documented *anywhere* that it does that. If it didn't delete the original contents url, this method would have been a perfect way to implement the behavior you want, and would have been good for my case as well. Le sigh. -- Seth Willits _______________________________________________ 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