refractor: move CopyTo

Will be replaced by os.CopyFS with go 1.23
This commit is contained in:
Alexandre Pujol 2024-10-12 15:40:17 +01:00
parent 982c2c66aa
commit e90ccd214c
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
5 changed files with 9 additions and 53 deletions

View file

@ -29,7 +29,7 @@ func (p FullSystemPolicy) Apply() ([]string, error) {
res := []string{}
// Install full system policy profiles
if err := util.CopyTo(paths.New("apparmor.d/groups/_full/"), prebuild.Root.Join("apparmor.d")); err != nil {
if err := paths.CopyTo(paths.New("apparmor.d/groups/_full/"), prebuild.Root.Join("apparmor.d")); err != nil {
return res, err
}
@ -58,5 +58,5 @@ func (p FullSystemPolicy) Apply() ([]string, error) {
}
// Set systemd unit drop-in files
return res, util.CopyTo(prebuild.SystemdDir.Join("full"), prebuild.Root.Join("systemd"))
return res, paths.CopyTo(prebuild.SystemdDir.Join("full"), prebuild.Root.Join("systemd"))
}