mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
fixed how file reference names are set
This commit is contained in:
parent
e0d0820d77
commit
ab644cb763
@ -98,11 +98,16 @@ class SourceGenerator {
|
||||
if let fileReference = fileReferencesByPath[path] {
|
||||
return fileReference
|
||||
} else {
|
||||
let fileReferencePath = path.byRemovingBase(path: inPath)
|
||||
var fileReferenceName: String? = name ?? fileReferencePath.lastComponent
|
||||
if fileReferencePath.string == fileReferenceName {
|
||||
fileReferenceName = nil
|
||||
}
|
||||
let fileReference = PBXFileReference(
|
||||
reference: referenceGenerator.generate(PBXFileReference.self, path.byRemovingBase(path: spec.basePath).string),
|
||||
sourceTree: sourceTree,
|
||||
name: name,
|
||||
path: path.byRemovingBase(path: inPath).string
|
||||
name: fileReferenceName,
|
||||
path: fileReferencePath.string
|
||||
)
|
||||
addObject(fileReference)
|
||||
fileReferencesByPath[path] = fileReference.reference
|
||||
|
Loading…
Reference in New Issue
Block a user