Fix error in Curl function where parent directory already exists

This commit is contained in:
Alessio 2022-10-15 15:17:15 -04:00
parent 069ddcd976
commit 4b5b098b9e

View File

@ -42,7 +42,7 @@ func (d DefaultDownloader) Curl(url string, outpath string) error {
// Ensure the output directory exists
dirname := path.Dir(outpath)
if dirname != "." {
err = os.Mkdir(dirname, 0755)
err = os.MkdirAll(dirname, 0755)
if err != nil {
panic(err)
}