• 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: Why would creating NSItemReplacementDirectory fail?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why would creating NSItemReplacementDirectory fail?


  • Subject: Re: Why would creating NSItemReplacementDirectory fail?
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 24 Jun 2015 15:53:31 -0500

On Jun 24, 2015, at 3:39 PM, Jens Alfke <email@hidden> wrote:

> Anyone know what would cause NSFileManager (on OS X 10.10) to fail to create an NSItemReplacementDirectory? We’re using this call to create a temporary directory to save an intermediate file into, and it works fine on iOS and Mac … except for right now, when it’s started reliably failing on my MacBook Pro. As in, it worked this morning but now after lunch it fails every time I run our unit tests:
>
>        NSError* error;
>        NSURL* parentURL = [NSURL fileURLWithPath: _path isDirectory: YES];
>        NSURL* tempDirURL = [[NSFileManager defaultManager]
>                                 URLForDirectory: NSItemReplacementDirectory
>                                 inDomain: NSUserDomainMask
>                                 appropriateForURL: parentURL
>                                 create: YES error: &error];
>
> _path looks like "/var/folders/4f/mvdftm3d5ss0ystm0m2q8q3m0000gn/T/CBL_BlobStoreTest”.
> The error is NSCocoaErrorDomain Code=512, which is NSFileWriteUnknownError, described in FoundationErrors.h as "Write error, reason unknown”. Not very helpful…

Does the NSError have an underlying error (key NSUnderlyingErrorKey in its userInfo)?

Regards,
Ken


_______________________________________________

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


References: 
 >Why would creating NSItemReplacementDirectory fail? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Why would creating NSItemReplacementDirectory fail?
  • Next by Date: Re: Why would creating NSItemReplacementDirectory fail?
  • Previous by thread: Why would creating NSItemReplacementDirectory fail?
  • Next by thread: Re: Why would creating NSItemReplacementDirectory fail?
  • Index(es):
    • Date
    • Thread