[Bug Fix] When hierarchy_path is nil (aka, the abstract_obejct is the main group) don't try to index on it.

This commit is contained in:
Mark Larsen
2014-10-09 01:08:36 -07:00
parent 0acb453076
commit 4c8bf66db4

View File

@@ -12,8 +12,12 @@ module Xcodeproj
end
def work_pathname
# hierarchy path has a leading '/' that will break path concatenation
@work_pathname ||= project.work_root_pathname + hierarchy_path[1..-1]
@work_pathname ||= if hierarchy_path
# hierarchy path has a leading '/' that will break path concatenation
project.work_root_pathname + hierarchy_path[1..-1]
else
project.work_root_pathname
end
end
def ensure_internal_consistency(group)