Follow-up Comment #1, bug #35671 (project gnustep):

I don't know how precise compatibility with Mac OS X/Cocoa should be for this
bug, but the behaviour proposed in the patch doesn't match it:

'Wrong error Error Domain=NSCocoaErrorDomain Code=516 "The file “foobar”
couldn’t be saved in the folder “tmp” because a file with the same name
already exists." UserInfo=0x7f85d940ab80 {NSFilePath=/tmp/foobar,
NSUnderlyingError=0x7f85d940a9d0 "The operation couldn’t be completed. File
exists"}'

but error code 516 is not EEXIST and the error is in the Cocoa error domain.
The _underlying_ error is in NSPOSIXErrorDomain and has code 17 (EEXIST). The
matching Foundation error (from Foundation/FoundationErrors.h) is this:

    NSFileWriteFileExistsError NS_ENUM_AVAILABLE(10_7, 5_0) = 516,          //
Write error (file exists)

which is what NSFileManager returns in Foundation. I think it'd be reasonable
for GNUstep-base to follow that example.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35671>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to