On Jun 24, 2015, at 3:39 PM, Jens Alfke <j...@mooseyard.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to