On 14 May 2011, at 12:46 AM, Rick Mann wrote: > NSError* err = nil; > NSURL* tempDir = [fm URLForDirectory: NSItemReplacementDirectory > inDomain: NSUserDomainMask > appropriateForURL: inURL > create: true > error: &err]; > if (err != nil) > { > NSLog(@"Error creating temporary directory for URL %@: %@", inURL, > err); > return; > }
[similar check of err later in the code] Quincey Morris identified your problem, but you can't do this. Methods that take NSError** are entitled to fill in the error return even if they succeed. Always check the principal return value (tempDir being nil, here) and _then_ you'll know that the NSError represents the actual description of a problem. — F _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com