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

@ -7,7 +7,6 @@ package prepare
import (
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild"
"github.com/roddhjav/apparmor.d/pkg/util"
)
type Synchronise struct {
@ -35,7 +34,7 @@ func (p Synchronise) Apply() ([]string, error) {
}
if p.Path == "" {
for _, name := range []string{"apparmor.d", "share"} {
if err := util.CopyTo(paths.New(name), prebuild.Root.Join(name)); err != nil {
if err := paths.CopyTo(paths.New(name), prebuild.Root.Join(name)); err != nil {
return res, err
}
}