Re: Can't delete file on device
Re: Can't delete file on device
- Subject: Re: Can't delete file on device
- From: Mike Abdullah <email@hidden>
- Date: Wed, 28 Mar 2012 00:08:09 +0100
On 27 Mar 2012, at 22:23, Rick Mann wrote:
>> There are a couple other issues:
>>
>> 1) You shouldn't handle errors by testing (err != nil). This might work
>> (since you initialized err to nil) assuming that removeItemAtURL: isn't
>> fiddling with err anyway, but it's not guaranteed. The preferred
>> approach is to test the return value of removeItemAtURL: (it returns
>> BOOL for a reason!) and examine err iff the method returns NO.
>
> Okay, I made that change, but it seems blatantly incorrect to create an error return if it is also going to return true.
http://weblog.bignerdranch.com/?p=360
_______________________________________________
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