diff --git a/common/config.go b/common/config.go index f1666058c..2b0de0c5c 100644 --- a/common/config.go +++ b/common/config.go @@ -73,9 +73,9 @@ func DownloadableURL(original string) (string, error) { if runtime.GOOS == "windows" { // If the path is using Windows-style slashes, URL parses // it into the host field. - if url.Path == "" && strings.Contains(url.Host, `\`) { - url.Path = url.Host - url.Host = "" + if u.Path == "" && strings.Contains(u.Host, `\`) { + u.Path = u.Host + u.Host = "" } } // Only do the filepath transformations if the file appears