mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Remove superfluous MkdirAll from MakeTempDirOrDie
After the call to ioutil.TempDir, the directory has already been created, and MkdirAll therefore can't do anything. The mode argument in particular is misleading.
This commit is contained in:
parent
d4c4871852
commit
f841f3ab40
@ -18,7 +18,6 @@ package utils
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
@ -31,8 +30,5 @@ func MakeTempDirOrDie(prefix string, baseDir string) string {
|
||||
if err != nil {
|
||||
glog.Fatalf("Can't make a temp rootdir: %v", err)
|
||||
}
|
||||
if err = os.MkdirAll(tempDir, 0750); err != nil {
|
||||
glog.Fatalf("Can't mkdir(%q): %v", tempDir, err)
|
||||
}
|
||||
return tempDir
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user