Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
SwampDragons committed Jan 9, 2018
1 parent 1caafbc commit 661c314
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ func DownloadableURL(original string) (string, error) {
func FileExistsLocally(original string) (bool, error) {
fileURL, _ := url.Parse(original)
fileExists := false
fmt.Printf("Swampy: original is %s\n", original)
fmt.Printf("Swampy: fileURL is %#v\n", fileURL)

if fileURL.Scheme == "file" {
// Remove forward slash on absolute Windows file URLs before processing
Expand All @@ -146,17 +148,14 @@ func FileExistsLocally(original string) (bool, error) {
filePath = filePath[1:]
}
fmt.Printf("Swampy: %#v\n", runtime.GOOS)
fmt.Printf("Swampy: %s\n", original)
fmt.Printf("Swampy: %s\n", filePath)
_, err := os.Stat(filePath)
if err != nil {
err = fmt.Errorf("could not stat file: %s\n", err)
return fileExists, err
} else {
fmt.Printf("Swampy: in the else statement")
fileExists = true
}
}
fmt.Printf("Swampy: made it to bottom of file")
return fileExists, nil
}

0 comments on commit 661c314

Please sign in to comment.