Xcode 8.3.2: File copy fails, but returns false positive
Originator: | thedov | ||
Number: | rdar://32378084 | Date Originated: | 24-May-2017 11:43 AM |
Status: | Closed | Resolved: | Duplicate of 30341932 |
Product: | macOS + SDK | Product Version: | Xcode 8.3.2 (8E2002) |
Classification: | Serious Bug | Reproducible: | Always |
Summary: I have unit test code that simulates various error conditions, including unreachable directories. With the latest Xcode and macOS (I upgraded both simultaneously), a file copy operation that has always failed (correctly), still fails, but reports success via a YES return value and a nil NSError. Steps to Reproduce: Build and test the attached project Expected Results: The unit test passes, indicating a failure to copy a file into a readonly directory, correctly reported as a failure via the API Actual Results: The unit test fails, because YES is returned from -[NSFileManager copyItemAtPath:toPath:error:]. No NSError value is returned either Version: Xcode 8.3.2 (8E2002) Notes: This was working for many prior versions of macOS/Xcode
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!