Skip to content

Commit

Permalink
fix build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
markus621 committed Aug 27, 2021
1 parent f51f5d5 commit 9ff2d37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/control/other.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ func (v *Other) WriteTo(dir string) error {

for _, file := range files {
if utils.FileExist(file.Src) {
if err := utils.CopyFile(file.Src, file.Dst); err != nil {
if err := utils.CopyFile(file.Dst, file.Src); err != nil {
return err
}
v.files = append(v.files, file.Dst)
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func FileExist(filename string) bool {
return err == nil
}

func CopyFile(src, dst string) error {
source, err := os.OpenFile(dst, os.O_RDONLY|os.O_CREATE|os.O_TRUNC, 0)
func CopyFile(dst, src string) error {
source, err := os.OpenFile(src, os.O_RDONLY, 0)
if err != nil {
return err
}
Expand Down

0 comments on commit 9ff2d37

Please sign in to comment.