From 1e853f9f1fcf36c54114db39039a50df7d4271c2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 13 Jun 2015 10:20:54 -0400 Subject: [PATCH] common: revert some changes from #2121 for Windows --- common/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/config.go b/common/config.go index ebbfa6d8c..e6c6477b5 100644 --- a/common/config.go +++ b/common/config.go @@ -99,6 +99,14 @@ func DownloadableURL(original string) (string, error) { // Make sure it is lowercased url.Scheme = strings.ToLower(url.Scheme) + // This is to work around issue #5927. This can safely be removed once + // we distribute with a version of Go that fixes that bug. + // + // See: https://code.google.com/p/go/issues/detail?id=5927 + if url.Path != "" && url.Path[0] != '/' { + url.Path = "/" + url.Path + } + // Verify that the scheme is something we support in our common downloader. supported := []string{"file", "http", "https"} found := false