feat(aa): cleanup rules methods.

This commit is contained in:
Alexandre Pujol 2024-05-28 18:07:32 +01:00
parent dc0e0084a0
commit 1333ec2025
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 14 additions and 24 deletions

View file

@ -159,7 +159,7 @@ func (f *AppArmorProfileFile) resolveInclude(include *Include) error {
}
// Insert iFile in the place of include in the current file
index := f.Preamble.IndexOf(include)
f.Preamble = f.Preamble.Insert(index, includeCache[include].Preamble...)
index := f.Preamble.Index(include)
f.Preamble = f.Preamble.Replace(index, includeCache[include].Preamble...)
return nil
}