Use fsx package and friends from pkglib

This commit is contained in:
Tom Wiesing 2023-04-08 17:51:17 +02:00
parent 1f8c55da7c
commit 0f6803f890
No known key found for this signature in database
35 changed files with 91 additions and 493 deletions

View file

@ -9,7 +9,7 @@ import (
"os"
"path/filepath"
"github.com/FAU-CDI/wisski-distillery/pkg/fsx"
"github.com/tkw1536/pkglib/fsx/umaskfree"
)
// Package packages the source directory into a 'tar.gz' file into destination.
@ -18,7 +18,7 @@ import (
// onCopy, when not nil, is called for each file being copied into the archive.
func Package(dst, src string, onCopy func(rel string, src string)) (count int64, err error) {
// create the target archive
archive, err := fsx.Create(dst, fsx.DefaultFilePerm)
archive, err := umaskfree.Create(dst, umaskfree.DefaultFilePerm)
if err != nil {
return 0, err
}