Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed: XCodeCapp adding duplicate files to Xcode project #1873

Merged
merged 1 commit into from

3 participants

@ahankinson

Previously, XCC would indiscriminately add files to the Xcode project via the pbxprojModifier.py script. This resulted in duplicate references to a file.

This fix adds a check to see if the file is already included in the project's sourceGroup folder, and will return None if it is.

Fixes #1866

@ahankinson ahankinson Fixed: XCodeCapp adding duplicate files to Xcode project
Previously, XCC would indiscriminately add files to the Xcode project via the pbxprojModifier.py script. This resulted in duplicate references to a file.

This fix adds a check to see if the file is already included in the project's sourceGroup folder, and will return None if it is.

Fixes #1866
5c3adfd
@ahankinson

-#new
+bug
+Tools
+#needs-review

@cappbot
Collaborator

Milestone: Someday. Labels: #needs-review, bug, tools. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

@primalmotion primalmotion merged commit 70081e1 into cappuccino:master

1 check passed

Details default The Travis build passed
@primalmotion
Owner

Merged Thanks!

+#fixed

@ahankinson ahankinson deleted the ahankinson:fix-issue1866 branch
@cappbot
Collaborator

Milestone: Someday. Labels: #fixed, bug, tools. What's next? This issue is considered successfully resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2013
  1. @ahankinson

    Fixed: XCodeCapp adding duplicate files to Xcode project

    ahankinson authored
    Previously, XCC would indiscriminately add files to the Xcode project via the pbxprojModifier.py script. This resulted in duplicate references to a file.
    
    This fix adds a check to see if the file is already included in the project's sourceGroup folder, and will return None if it is.
    
    Fixes #1866
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  Tools/XcodeCapp/pbxprojModifier.py
View
3  Tools/XcodeCapp/pbxprojModifier.py
@@ -22,6 +22,9 @@ def update_general_include(project, projectBaseURL):
def add_file(project, shadowGroup, sourceGroup, shadowHeaderPath, shadowImplementationFilePath, sourcePath, projectBaseURL):
project.add_file(shadowHeaderPath, parent=shadowGroup)
project.add_file(shadowImplementationFilePath, parent=shadowGroup)
+
+ if sourcePath in project.get_files_by_os_path(os.path.relpath(sourcePath, projectBaseURL)):
+ return
project.add_file(sourcePath, parent=sourceGroup)
def remove_file(project, shadowGroup, sourceGroup, shadowHeaderPath, shadowImplementationFilePath, sourcePath, projectBaseURL):
Something went wrong with that request. Please try again.