refractor: rename some path util function.

This commit is contained in:
Alexandre Pujol 2024-10-12 15:31:24 +01:00
parent ebdeef152c
commit 982c2c66aa
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
13 changed files with 87 additions and 82 deletions

View file

@ -8,7 +8,6 @@ import (
"strings"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/util"
)
// Default content of debian/apparmor.d.hide. Whonix has special addition.
@ -29,7 +28,7 @@ func (f Flagger) Read(name string) map[string][]string {
return res
}
lines := util.MustReadFileAsLines(path)
lines := path.MustReadFilteredFileAsLines()
for _, line := range lines {
manifest := strings.Split(line, " ")
profile := manifest[0]
@ -49,7 +48,7 @@ func (i Ignorer) Read(name string) []string {
if !path.Exist() {
return []string{}
}
return util.MustReadFileAsLines(path)
return path.MustReadFilteredFileAsLines()
}
type DebianHider struct {