Skip to content

Commit

Permalink
fix: fixup previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarIthawi committed Jun 30, 2024
1 parent fd6eca6 commit a9187b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pbxproj/pbxextensions/ProjectFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ def add_folder(self, path, parent=None, excludes=None, recursive=True, create_gr
# add the top folder as a group, make it the new parent
path = os.path.abspath(path)
if not create_groups and os.path.splitext(path)[1] not in ProjectFiles._SPECIAL_FOLDERS:
return self.add_file(path, parent, target_name=target_name, force=False, tree=TreeType.GROUP,
file_options=file_options)
return self.add_file(path, name=None, parent=parent, target_name=target_name,
force=False, tree=TreeType.GROUP, file_options=file_options)

parent = self.get_or_create_group(os.path.split(path)[1], path, parent, make_relative=file_options.add_groups_relative)

Expand All @@ -430,8 +430,8 @@ def add_folder(self, path, parent=None, excludes=None, recursive=True, create_gr
if os.path.isfile(full_path) or os.path.splitext(child)[1] in ProjectFiles._SPECIAL_FOLDERS or \
not create_groups:
# check if the file exists already, if not add it
children = self.add_file(full_path, parent, target_name=target_name, force=False, tree=TreeType.GROUP,
file_options=file_options)
children = self.add_file(full_path, name=None, parent=parent, target_name=target_name,
force=False, tree=TreeType.GROUP, file_options=file_options)
else:
# if recursive is true, go deeper, otherwise create the group here.
if recursive:
Expand Down

0 comments on commit a9187b4

Please sign in to comment.