fiw review

This commit is contained in:
AlteredCoder 2020-05-27 17:57:37 +02:00 committed by Farica
parent fd6ecd25df
commit ed919a55be

View file

@ -42,7 +42,7 @@ func downloadFile(url string, destPath string) error {
return fmt.Errorf("download response 'HTTP %d' : %s", resp.StatusCode, string(body))
}
file, err := os.OpenFile(destPath, os.O_RDWR|os.O_CREATE, 0644)
file, err := os.OpenFile(destPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
return err
}