Replace deprecated system.TempFileSequential with os.CreateTemp
This commit is contained in:
parent
6025ab443f
commit
10f60fee1d
|
@ -23,7 +23,6 @@ import (
|
||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
dockerClient "github.com/docker/docker/client"
|
dockerClient "github.com/docker/docker/client"
|
||||||
"github.com/docker/docker/pkg/archive"
|
"github.com/docker/docker/pkg/archive"
|
||||||
"github.com/docker/docker/pkg/system"
|
|
||||||
"github.com/klauspost/pgzip"
|
"github.com/klauspost/pgzip"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/urfave/cli"
|
"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 {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue