XcodeEditor icon indicating copy to clipboard operation
XcodeEditor copied to clipboard

Adding XCClassDefinition to newly created group crashes app

Open coduggan opened this issue 12 years ago • 1 comments

Create a group with addGroupWithPath:.

Add a XCClassDefinition to that group, and when you save the project, it will crash saying:

'Error writing file at filePath: /path/to/file/MyNewClass.m, error: Error Domain=NSCocoaErrorDomain Code=4 "The folder “MyNewClass.m” doesn’t exist."

May be because in the commitFileOperations method, the file writes occur before the directories are created:

[self performFileWrites];
[self performCopyFrameworks];
[self performFileDeletions];
[self performCreateDirectories];

Maybe put performCreateDirectories first?

coduggan avatar Jun 10 '13 09:06 coduggan

Oops, oh dear. Yes that sounds like the solution. If off the laptop now but will do tomorrow. Sorry about the bug.

jasperblues avatar Jun 10 '13 12:06 jasperblues