Merge pull request #5591 from hashicorp/fix_5589

fix regression :(
This commit is contained in:
SwampDragons 2017-11-16 14:35:19 -08:00 committed by GitHub
commit 76e3167b6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -15,7 +15,6 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"runtime"
) )
// DownloadConfig is the configuration given to instantiate a new // DownloadConfig is the configuration given to instantiate a new
@ -130,10 +129,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 {