• 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
False positive on writeToURL:atomically:encoding:error: ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

False positive on writeToURL:atomically:encoding:error: ?


  • Subject: False positive on writeToURL:atomically:encoding:error: ?
  • From: Martin Hewitson <email@hidden>
  • Date: Sat, 23 Jun 2012 19:50:26 +0200

Dear list,

I have an interesting bug report from a user of an app of mine. The app manages files and allows the user to edit them. When they save the project each file is saved to disk (if necessary). They are experiencing what appears to be a false positive of writeToURL:atomically:encoding:error:. The file actually does save, but the error comes back non-nil and when presented says:

"You don’t have permission to save the file “XXX” in the folder “YYY”.

The piece of code I use is

  NSError *error = nil;
  [content writeToURL:aURL atomically:YES encoding:encoding error:&error];
  if (error) {
    [NSApp presentError:error];
    return NO;
  }

By giving the user a debug version of the app with lots of NSLog statements, we narrowed it down to the above code. So even though the file is saved, 'error' comes back non-nil.

Has anyone seen such behaviour before, or does anyone have any idea how to further investigate this?

Best wishes,

Martin




_______________________________________________

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: False positive on writeToURL:atomically:encoding:error: ?
      • From: Jeff Kelley <email@hidden>
    • Re: False positive on writeToURL:atomically:encoding:error: ?
      • From: Eeyore <email@hidden>
  • Prev by Date: Re: Lion permission problems
  • Next by Date: Re: False positive on writeToURL:atomically:encoding:error: ?
  • Previous by thread: Re: Lion permission problems
  • Next by thread: Re: False positive on writeToURL:atomically:encoding:error: ?
  • Index(es):
    • Date
    • Thread