Replace deprecated system.TempFileSequential with os.CreateTemp

This commit is contained in:
Richard M 2023-07-14 20:49:20 +01:00 committed by Gitea
parent 6025ab443f
commit 10f60fee1d
1 changed files with 1 additions and 2 deletions

View File

@ -23,7 +23,6 @@ import (
"github.com/docker/docker/api/types/filters"
dockerClient "github.com/docker/docker/client"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/system"
"github.com/klauspost/pgzip"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
@ -262,7 +261,7 @@ func runBackup(cl *dockerClient.Client, app config.App, serviceName string, bkCo
}
func copyToFile(outfile string, r io.Reader) error {
tmpFile, err := system.TempFileSequential(filepath.Dir(outfile), ".tar_temp")
tmpFile, err := os.CreateTemp(filepath.Dir(outfile), ".tar_temp")
if err != nil {
return err
}