• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSData Silently Failing to Write on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSData Silently Failing to Write on Leopard
      • From: Jonathon Mah <email@hidden>
  • Prev by Date: Re: NSTableView, NSArrayController and secondary sortings
  • Next by Date: Re: NSData Silently Failing to Write on Leopard
  • Previous by thread: Re: Debugger exits with signal 5 (SIGTRAP) after computer crashed.
  • Next by thread: Re: NSData Silently Failing to Write on Leopard
  • Index(es):
    • Date
    • Thread