URL: <http://savannah.gnu.org/bugs/?51592>
Summary: -[NSFileManager copyItemAtPath:toPath:error:] should not raise exceptions Project: GNUstep Submitted by: lcampbel Submitted on: Thu 27 Jul 2017 03:30:08 PM UTC Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: At the top of _copyFile:toFile:handler:, we have this: /* Assumes source is a file and exists! */ NSAssert1 ([self fileExistsAtPath: source], @"source file '%@' does not exist!", source); attributes = [self fileAttributesAtPath: source traverseLink: NO]; NSAssert1 (attributes, @"could not get the attributes for file '%@'", source); However, any other error causes the handler (if any) to be called and NO to be returned. I think these asserts should be replaced by something like: if (!exists) return [self _proceedAccordingToHandler: handler forError: @"source file does not exist" inPath: source fromPath: source toPath: destination]; _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51592> _______________________________________________ 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