Packaging Fix
This commit is contained in:
@@ -165,6 +165,7 @@ func packageBuiltTopData(p *project.Project, nativeResult BuildResult, progress
|
||||
|
||||
func collectTopPackageResources(p *project.Project, compiled2DADir string) ([]erf.Resource, int, error) {
|
||||
resourceByKey := map[string]erf.Resource{}
|
||||
resourceSourceByKey := map[string]string{}
|
||||
|
||||
entries, err := os.ReadDir(compiled2DADir)
|
||||
if err != nil {
|
||||
@@ -179,7 +180,9 @@ func collectTopPackageResources(p *project.Project, compiled2DADir string) ([]er
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
resourceByKey[topPackageResourceKey(resource)] = resource
|
||||
key := topPackageResourceKey(resource)
|
||||
resourceByKey[key] = resource
|
||||
resourceSourceByKey[key] = path
|
||||
}
|
||||
|
||||
assetFiles := 0
|
||||
@@ -210,10 +213,11 @@ func collectTopPackageResources(p *project.Project, compiled2DADir string) ([]er
|
||||
return err
|
||||
}
|
||||
key := topPackageResourceKey(resource)
|
||||
if _, ok := resourceByKey[key]; ok {
|
||||
return fmt.Errorf("topdata asset %s collides with generated top package resource %s", path, key)
|
||||
if existing, ok := resourceSourceByKey[key]; ok {
|
||||
return fmt.Errorf("topdata asset %s collides with %s for top package resource %s", path, existing, key)
|
||||
}
|
||||
resourceByKey[key] = resource
|
||||
resourceSourceByKey[key] = path
|
||||
assetFiles++
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user