NSData Silently Failing to Write on Leopard
NSData Silently Failing to Write on Leopard
- Subject: NSData Silently Failing to Write on Leopard
- From: Simone Manganelli <email@hidden>
- Date: Sun, 9 Dec 2007 00:45:34 -0800
So I'm having some weird problems with an NSData object writing to a
file on Leopard. Here's the relevant three lines of code:
NSError *fileWriteError = nil;
NSLog(@"%@",fullWritePath);
BOOL wrote = [[theImage TIFFRepresentation] writeToFile:
fullWritePath options:1 error:&fileWriteError];
NSLog(@"%@",fileWriteError);
if (! wrote) NSLog(@"write failed");
The variable "fullWritePath" is a path to a directory I know exists
and one to which I can write: /Users/username/Desktop/testdir/
On Tiger, the path gets displayed, the error that's logged is
"(null)", and no "write failed" message ever comes up. However, on
Leopard, the path gets displayed, the error is *still* "(null)", but
"write failed" comes up for each image that I am trying to write to
disk.
What would cause this code to work fine on Tiger but not on Leopard,
and to cause it to fail but not generate any error message? Any help
would be much appreciated.
-- Simone
_______________________________________________
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