remove the actual offending code

This commit is contained in:
Megan Marsh 2017-11-16 11:03:10 -08:00
parent 74a4cc04fe
commit 4fb8a27879
2 changed files with 0 additions and 12 deletions

View File

@ -109,14 +109,6 @@ func DownloadableURL(original string) (string, error) {
// Make sure it is lowercased // Make sure it is lowercased
url.Scheme = strings.ToLower(url.Scheme) 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. // Verify that the scheme is something we support in our common downloader.
supported := []string{"file", "http", "https"} supported := []string{"file", "http", "https"}
found := false found := false

View File

@ -130,10 +130,6 @@ func (d *DownloadClient) Get() (string, error) {
// locally and we don't make a copy. Normally we would copy or download. // locally and we don't make a copy. Normally we would copy or download.
log.Printf("[DEBUG] Using local file: %s", finalPath) log.Printf("[DEBUG] Using local file: %s", finalPath)
// Remove forward slash on absolute Windows file URLs before processing
if runtime.GOOS == "windows" && len(finalPath) > 0 && finalPath[0] == '/' {
finalPath = finalPath[1:]
}
// Keep track of the source so we can make sure not to delete this later // Keep track of the source so we can make sure not to delete this later
sourcePath = finalPath sourcePath = finalPath
if _, err = os.Stat(finalPath); err != nil { if _, err = os.Stat(finalPath); err != nil {