Skip to content

Commit

Permalink
make sure directory used in CreateTemp exists
Browse files Browse the repository at this point in the history
  • Loading branch information
elv-gilles committed Nov 13, 2023
1 parent e848778 commit d757723
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/testutil/testdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func eluvioTempDir() string {
func CreateTemp(dir, suffix string) (*os.File, error) {
if dir == "" {
dir = eluvioTempDir()
_ = os.MkdirAll(dir, os.ModePerm)
}
return os.CreateTemp(dir, suffix)
}
Expand Down

0 comments on commit d757723

Please sign in to comment.