mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 23:41:38 +08:00
fix: wrong baseURL if open window twice (#3273)
This commit is contained in:
parent
b8537d1c96
commit
a9c22f0588
@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fix replace line in `go.mod` to use relative paths. Fixes Windows paths with spaces - @leaanthony.
|
||||
- Fix MacOS systray click handling when no attached window by [thomas-senechal](https://github.com/thomas-senechal) in PR [#3207](https://github.com/wailsapp/wails/pull/3207)
|
||||
- Fix failing Windows build due to unknown option by [thomas-senechal](https://github.com/thomas-senechal) in PR [#3208](https://github.com/wailsapp/wails/pull/3208)
|
||||
- Fix wrong baseURL when open window twice by @5aaee9 in PR [#3273](https://github.com/wailsapp/wails/pull/3273)
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -7,7 +7,6 @@ import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@ -160,8 +159,7 @@ func GetStartURL(userURL string) (string, error) {
|
||||
return "", fmt.Errorf("Error parsing URL: " + err.Error())
|
||||
}
|
||||
if parsedURL.Scheme == "" {
|
||||
baseURL.Path = path.Join(baseURL.Path, userURL)
|
||||
startURL = baseURL.String()
|
||||
startURL = baseURL.ResolveReference(&url.URL{Path: userURL}).String()
|
||||
// if the original URL had a trailing slash, add it back
|
||||
if strings.HasSuffix(userURL, "/") && !strings.HasSuffix(startURL, "/") {
|
||||
startURL = startURL + "/"
|
||||
|
Loading…
Reference in New Issue
Block a user