Fixed a bug on linux related to forgetting to check the platform for the forward-slash prefix.
This commit is contained in:
parent
41f4dc3f3d
commit
f9572cb244
|
@ -123,8 +123,11 @@ func DownloadableURL(original string) (string, error) {
|
|||
|
||||
// Otherwise, check if it was originally an absolute path, and fix it if so.
|
||||
if strings.HasPrefix(original, "/") {
|
||||
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.
|
||||
result = filepath.ToSlash(filepath.Clean(result))
|
||||
|
|
Loading…
Reference in New Issue