Fixed a bug on linux related to forgetting to check the platform for the forward-slash prefix.

This commit is contained in:
Ali Rizvi-Santiago 2018-01-18 23:48:20 -06:00
parent 41f4dc3f3d
commit f9572cb244
1 changed files with 4 additions and 1 deletions

View File

@ -123,7 +123,10 @@ func DownloadableURL(original string) (string, error) {
// Otherwise, check if it was originally an absolute path, and fix it if so.
if strings.HasPrefix(original, "/") {
return fmt.Sprintf("file:///%s", result), nil
if runtime.GOOS == "windows" {
return fmt.Sprintf("file:///%s", result), nil
}
return fmt.Sprintf("file://%s", result), nil
}
// Anything left should be a non-existent relative path. So fix it up here.