mirror of
https://github.com/containers/podman.git
synced 2025-10-29 17:06:22 +08:00
fix systemcontext to use correct TMPDIR
Users are complaining about read/only /var/tmp failing even if TMPDIR=/tmp is set. This PR Fixes: https://github.com/containers/podman/issues/10698 [NO TESTS NEEDED] No way to test this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
4
vendor/github.com/containers/common/libimage/download.go
generated
vendored
4
vendor/github.com/containers/common/libimage/download.go
generated
vendored
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
// tmpdir returns a path to a temporary directory.
|
||||
func (r *Runtime) tmpdir() string {
|
||||
func tmpdir() string {
|
||||
tmpdir := os.Getenv("TMPDIR")
|
||||
if tmpdir == "" {
|
||||
tmpdir = "/var/tmp"
|
||||
@ -25,7 +25,7 @@ func (r *Runtime) tmpdir() string {
|
||||
func (r *Runtime) downloadFromURL(source string) (string, error) {
|
||||
fmt.Printf("Downloading from %q\n", source)
|
||||
|
||||
outFile, err := ioutil.TempFile(r.tmpdir(), "import")
|
||||
outFile, err := ioutil.TempFile(r.systemContext.BigFilesTemporaryDir, "import")
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "error creating file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user