Moving a non-folder group from one folder-group to another, moves the entire folder

Originator:bruno
Number:rdar://33744915 Date Originated:06-Aug-2017 07:59 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:Version 9.0 beta 4 (9M189t)
Classification:Security Reproducible:Always
 
Summary:
When moving a non-folder group from one folder-group A to another folder-group B, Xcode moves the entire originating folder A to folder B.

This breaks the build on the project, because the original folder and file references in the project are lost.

Steps to Reproduce:
1. Start new project.
2. Create a group ‘SomeFiles’ with a Folder.
3. Add a file in the group ‘SomeFiles’.
4. Create a group ‘SomeOtherFiles’ with a Folder.
5. Create a file in the group ‘SomeOtherFiles’.
6. Prepare some data files in the project root folder. Don’t add them to the project yet.
7. Create a ‘Group without a Folder’ named ‘Data’ in the group ‘SomeFiles’.
8. Add the data files to the group ‘Data’ without copying them. Uncheck ‘Copy items if needed’.
9. Move the folder ‘Data’ from the group ‘SomeFiles’ to the group ‘SomeOtherFiles’.


Expected Results:
*The group ‘Data’ with its contents gets moved to the group ‘SomeOtherFiles’.
* No other changes are made to the project and folder structure.

Actual Results:
* ✅ The group ‘Data’ with its contents gets moved to the group ‘SomeOtherFiles’.
* ❌ The entire folder ‘SomeFiles’ is moved to the folder ‘SomeOtherFiles’
* ❌ Because the folder ‘SomeFiles’ along with the file ‘SomeFile’ has moved, the project loses the reference. The project wouldn’t compile anymore.


Version:
Version 9.0 beta 4 (9M189t)

Notes:
Added a .zip with an example Xcode project. It includes the git repository with a 'before' and 'after' commit and two screenshots illustrating the folder structure 'before' and 'after'.

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!