Re: NSFileManager - a cautionary tale
Re: NSFileManager - a cautionary tale
- Subject: Re: NSFileManager - a cautionary tale
- From: Greg Parker <email@hidden>
- Date: Thu, 28 Jul 2011 13:38:49 -0700
On Jul 26, 2011, at 6:51 PM, Graham Cox wrote:
> On 27/07/2011, at 11:14 AM, Graham Cox wrote:
>> However, this method eventually calls mkdir, which fails with an error if the directory already exists. This call to mkdir causes the App Store reviewers to have conniptions, even though it certainly fails. The failure of mkdir is interpreted by NSFileManager as a success (i.e. the method apparently works by attempting the mkdir, rather than checking for its existence beforehand).
Did you file a bug report?
> Another thing to mention - we run this code during app launch, so we didn't see it in fs_usage, which requires that the process it's peeking at is running already. I'm not sure if there is a way to observe file system stuff during launch - if anyone knows, please let me know!
Run in a debugger with a breakpoint at the top of main(). When you hit the breakpoint, start on fs_usage and continue. If you need to catch something that runs before main(), try a breakpoint on something low-level like malloc() and disable it after it hits the first time.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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