Skip to content

Commit

Permalink
Remove superfluous MkdirAll from MakeTempDirOrDie
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
justinsb committed Oct 8, 2018
1 parent d4c4871 commit f841f3a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/utils/tmpdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package utils

import (
"io/ioutil"
"os"

"github.com/golang/glog"
)
Expand All @@ -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
}

0 comments on commit f841f3a

Please sign in to comment.