From 898dadd53c3011e05764e32f2936ae6e95f3e8b3 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 10 Jan 2018 10:03:36 -0800 Subject: [PATCH] re-add this block. I still don't think we need it but I don't want to risk breaking things with this bugfix. --- common/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/config.go b/common/config.go index 5ef4d3369..f1666058c 100644 --- a/common/config.go +++ b/common/config.go @@ -69,6 +69,15 @@ func DownloadableURL(original string) (string, error) { } if u.Scheme == "file" { + // Windows file handling is all sorts of tricky... + 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 = "" + } + } // Only do the filepath transformations if the file appears // to actually exist. if _, err := os.Stat(u.Path); err == nil {