https request fix path separator
This commit is contained in:
parent
4a35078f90
commit
dadf5f641b
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/wailsapp/wails/v2/pkg/runtime"
|
"github.com/wailsapp/wails/v2/pkg/runtime"
|
||||||
)
|
)
|
||||||
@ -11,6 +12,7 @@ import (
|
|||||||
const BlockSize = 1024 * 64
|
const BlockSize = 1024 * 64
|
||||||
|
|
||||||
func HttpDownload(path string, out io.Writer, ctx context.Context) error {
|
func HttpDownload(path string, out io.Writer, ctx context.Context) error {
|
||||||
|
path = strings.ReplaceAll(path, "\\", "/")
|
||||||
res, err := http.Get("https://fclauncher.piwalker.net/fclauncher/" + path)
|
res, err := http.Get("https://fclauncher.piwalker.net/fclauncher/" + path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user