Change the pattern of temporary file downloaded from S3

This commit is contained in:
M. Mert Yildiran 2023-06-29 02:21:32 +03:00
parent 261e850a59
commit 3b758d15a0
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -307,7 +307,7 @@ func downloadTarFromS3(s3Url string) (tarPath string, err error) {
}
var file *os.File
file, err = os.CreateTemp(os.TempDir(), filepath.Base(key))
file, err = os.CreateTemp(os.TempDir(), fmt.Sprintf("%s_*.%s", strings.TrimSuffix(filepath.Base(key), filepath.Ext(key)), filepath.Ext(key)))
if err != nil {
return
}