Hello. I am working on a plugin for Mail.app for Mountain Lion. The problem is whenever I try to save a file, I am getting an error. Which can be explained by the fact that Mail.app is sandboxed and I am not allowed to modify files anywhere on the system. So what I do instead - is call
TempDir = [[[NSFileManager defaultManager] URLForDirectory: NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create: YES error:nil] path]; and then create in this TempDir another directory using standard NSFileManager functions. On my Mail.app it works, on another system - it doesn't (the dir doesn't get created). I can't understand why. I was hoping to store a temporary file in Downloads, since Mail obviously should have access to this directory. I also tried calling this TempDir = [[[[NSFileManager defaultManager] URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask appropriateForURL:[NSURL URLWithString: @"file:///private/var/tmp/my.great.app"] create:YES error:nil] path] retain]; On my 10.8 system it works, on another - it doesn't (I can't save files to TempDir from my plugin). What am I doing wrong? And why on one 10.8 system this method works, and on another 10.8 it doesn't? This is a plugin (a bundle with an executable) for Mail.app. Thanks for any insights! _______________________________________________ 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