From f841f3ab40d1d8245da793d60ab980cd9c9b3357 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Mon, 8 Oct 2018 18:09:21 -0400 Subject: [PATCH] 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. --- test/utils/tmpdir.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/utils/tmpdir.go b/test/utils/tmpdir.go index 7887a4de925..51cf19f1c1e 100644 --- a/test/utils/tmpdir.go +++ b/test/utils/tmpdir.go @@ -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 }