Fix "path.Clean" behavior to take arch-specific Directory values into account too
This commit is contained in:
parent
7d4d3222cd
commit
ab12b4904b
|
|
@ -89,6 +89,14 @@ func (entry *Manifest2822Entry) SeedArchValues() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func (entry *Manifest2822Entry) CleanDirectoryValues() {
|
||||||
|
entry.Directory = path.Clean(entry.Directory)
|
||||||
|
for field, val := range entry.ArchValues {
|
||||||
|
if strings.HasSuffix(field, "-Directory") && val != "" {
|
||||||
|
entry.ArchValues[field] = path.Clean(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const StringSeparator2822 = ", "
|
const StringSeparator2822 = ", "
|
||||||
|
|
||||||
|
|
@ -385,7 +393,7 @@ func (manifest *Manifest2822) AddEntry(entry Manifest2822Entry) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
entry.DeduplicateSharedTags()
|
entry.DeduplicateSharedTags()
|
||||||
entry.Directory = path.Clean(entry.Directory)
|
entry.CleanDirectoryValues()
|
||||||
|
|
||||||
if invalidArchitectures := entry.InvalidArchitectures(); len(invalidArchitectures) > 0 {
|
if invalidArchitectures := entry.InvalidArchitectures(); len(invalidArchitectures) > 0 {
|
||||||
return fmt.Errorf("Tags %q has invalid Architectures: %q", entry.TagsString(), strings.Join(invalidArchitectures, ", "))
|
return fmt.Errorf("Tags %q has invalid Architectures: %q", entry.TagsString(), strings.Join(invalidArchitectures, ", "))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue