• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug with Localized Failure Reason and file moving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug with Localized Failure Reason and file moving


  • Subject: Re: Bug with Localized Failure Reason and file moving
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 25 Mar 2015 00:56:29 +0000

On Mar 24, 2015, at 17:44 , Daryle Walker <email@hidden> wrote:
>
>                [[NSFileManager defaultManager] moveItemAtURL:location toURL:finalLocation error:&error];
>                if (error) {

Your code is wrong. You must test the return value of ‘moveItemAtURL:’ for success or failure. Only if the result is NO (failure) is the error valid.

In this case, the move is likely succeeding, and the error parameter doesn’t contain a meaningful error.



_______________________________________________

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


  • Follow-Ups:
    • Re: Bug with Localized Failure Reason and file moving
      • From: Daryle Walker <email@hidden>
References: 
 >Bug with Localized Failure Reason and file moving (From: Daryle Walker <email@hidden>)

  • Prev by Date: Best way to move a file out of the way?
  • Next by Date: Re: Best way to move a file out of the way?
  • Previous by thread: Bug with Localized Failure Reason and file moving
  • Next by thread: Re: Bug with Localized Failure Reason and file moving
  • Index(es):
    • Date
    • Thread