diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 55854991712..549c584140c 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -39,6 +39,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 diff --git a/v3/internal/assetserver/assetserver.go b/v3/internal/assetserver/assetserver.go index 4acddcddf3e..0d80007e763 100644 --- a/v3/internal/assetserver/assetserver.go +++ b/v3/internal/assetserver/assetserver.go @@ -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 + "/"