remove the actual offending code
This commit is contained in:
parent
74a4cc04fe
commit
4fb8a27879
|
@ -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
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue