aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers_export.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/compat/containers_export.go')
-rw-r--r--pkg/api/handlers/compat/containers_export.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/containers_export.go b/pkg/api/handlers/compat/containers_export.go
index 66e1dcca5..03e547411 100644
--- a/pkg/api/handlers/compat/containers_export.go
+++ b/pkg/api/handlers/compat/containers_export.go
@@ -2,7 +2,6 @@ package compat
import (
"fmt"
- "io/ioutil"
"net/http"
"os"
@@ -19,7 +18,7 @@ func ExportContainer(w http.ResponseWriter, r *http.Request) {
utils.ContainerNotFound(w, name, err)
return
}
- tmpfile, err := ioutil.TempFile("", "api.tar")
+ tmpfile, err := os.CreateTemp("", "api.tar")
if err != nil {
utils.Error(w, http.StatusInternalServerError, fmt.Errorf("unable to create tempfile: %w", err))
return