Skip to content

Commit

Permalink
make tmpFile close the newly created file in case a future task need …
Browse files Browse the repository at this point in the history
…to delete it

This could cause checksumming from file on windows to error because the go-getter would try to download to that temporary file that is still opened.
This probably worked on unix system as the system considered the process as being the same.
  • Loading branch information
azr committed Jan 31, 2019
1 parent dde89f9 commit dee4c79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ func tmpFile(dir, pattern string) (string, error) {
if err != nil {
return "", err
}
f.Close()
return f.Name(), nil
}

0 comments on commit dee4c79

Please sign in to comment.