lib/xcake/xcode/project.rb in xcake-0.8.13 vs lib/xcake/xcode/project.rb in xcake-0.9.0
- old
+ new
@@ -138,13 +138,12 @@
# => path of the group from the source root
#
# @return [PBXGroup] existing or new xcode group
#
def group_for_file_reference_path(path)
- clean_path = path.cleanpath
group = variant_group_for_path(path)
- group = group_for_path(path) unless group
+ group ||= group_for_path(path)
group
end
private
@@ -161,10 +160,11 @@
def variant_group_for_path(path)
group_path = path.dirname.cleanpath
base_name = group_path.basename
return nil unless base_name.to_s.include?('.lproj')
+
parent_group = group_for_path(group_path)
group = parent_group[path.basename.to_s]
unless group
@@ -179,9 +179,10 @@
def group_for_path(path)
group_path = path.dirname.cleanpath
return main_group unless group_path.to_s != '.'
+
main_group.child_for_path(group_path.to_s)
end
public