From dee4c79c489292b5ba74a4a633229166f0bfae4f Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 31 Jan 2019 13:39:45 +0100 Subject: [PATCH] make tmpFile close the newly created file in case a future task need 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. --- common.go | 1 + 1 file changed, 1 insertion(+) diff --git a/common.go b/common.go index c4e157a65..d2afd8ad8 100644 --- a/common.go +++ b/common.go @@ -9,5 +9,6 @@ func tmpFile(dir, pattern string) (string, error) { if err != nil { return "", err } + f.Close() return f.Name(), nil }