Re: Why would creating NSItemReplacementDirectory fail?
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