Re: Can't delete file on device
Re: Can't delete file on device
- Subject: Re: Can't delete file on device
- From: Gregory Weston <email@hidden>
- Date: Tue, 27 Mar 2012 17:59:54 -0400
Rick Mann wrote:
> The file is generated and deleted by code; it's the same string passed around, at least certainly in the existence check just before the attempted delete. Surely that existence check would fail, too?
Not necessarily. The problem with patterns like "check if transient resource exists, then try to operate on transient resource" is that the existence of the resource can change between the test and the usage.
It might be amusing to perform your existence test again after the delete fails. (Although, you know, not strictly reliable for the above reason.)
Also: Can we see the code? I'm not sure if "that's just the way it is" but I'm a little confused about the bits where the log output says "NSURL=" and what follows is an unadorned path.
_______________________________________________
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