Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroupReference neglects parent node's path #657

Closed
k3zi opened this issue Jan 29, 2019 · 0 comments
Closed

GroupReference neglects parent node's path #657

k3zi opened this issue Jan 29, 2019 · 0 comments

Comments

@k3zi
Copy link
Contributor

k3zi commented Jan 29, 2019

location = location_array[1] || ''

The same treatment that was done for FileReferences in: #633 needs to be considered for GroupReferences since groups can be nested in sub groups that use relative paths.

This can cause miscalculations like skipping over the parent group's folder while outputting the absolute file path.

Here is an example structure that would cause this:

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <Group
      location = "group:MyGroup"
      name = "MyGroup">
      <Group
         location = "group:MyRelativeToGroupSubGroup"
         name = "MyRelativeToGroupSubGroup">
         <FileRef
            location = "group:Project1/Project1.xcodeproj">
         </FileRef>

where Project1 is located at /path/to/workspace/MyGroup/MyRelativeToGroupSubGroup/Project1.xcodeproj. However FileReference.absolute_path now returns /path/to/workspace/MyRelativeToGroupSubGroup/Project1.xcodeproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant