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…

No, I’m not out of disk space (4.4GB free at the moment.)

We actually had a bug reported a few months ago that stemmed from this, but we 
could never manage to reproduce it.

—Jens
_______________________________________________

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