lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
245 stars 17 forks source link

26487958: Adding an ObjC category with name matching an existing folder erroneously fails #14747

Open openradar-mirror opened 8 years ago

openradar-mirror commented 8 years ago

Description

Summary: In Xcode 7, developers can add an Objective-C category to extend existing classes. When adding such a category, developers are prompted for both the name of the category and the class to be extended. The resulting file is named Class+CategoryName.[hm].

However, if a folder already exists with the given category name, the file add fails, claiming something named "CategoryName" already exists. This should be irrelevant, since the add dialog won't attempt to create anything named CategoryName.

Steps to Reproduce:

  1. Create a new Xcode project from sample
  2. In the project's source directory, create a folder named Extensions
  3. In Xcode, add a new Objective-C category on any class named Extensions; save it in the source directory
  4. Click Next

Expected Results: The addition should succeed.

Actual Results: The addition fails with error: '"Extensions" already exists. Do you want to replace it?'

Version: Xcode 7.3.1 (7D1014) / OS X 10.11.5 (15F34)

Notes: Download the attached sample project to cover steps 1 and 2 from above; open the project and continue from step 3.

Configuration: Any Mac

Attachments: 'SomeArbitraryProject.zip' was successfully uploaded.

Product Version: Xcode 7.3.1 (7D1014) / OS X 10.11.5 (15F34) Created: 2016-05-26T06:31:36.711910 Originated: 2016-05-25T23:30:00 Open Radar Link: http://www.openradar.me/26487958

openradar-mirror commented 8 years ago

Modified: 2016-05-26T06:31:36.712120