mirror of https://github.com/matrix-org/gomatrix
Build issues resolved
This commit is contained in:
parent
f96350d0a8
commit
8d38784ec2
|
@ -69,7 +69,7 @@ func (cli *Client) BuildBaseURL(urlPath ...string) string {
|
||||||
parts := []string{hsURL.Path}
|
parts := []string{hsURL.Path}
|
||||||
parts = append(parts, urlPath...)
|
parts = append(parts, urlPath...)
|
||||||
hsURL.Path = path.Join(parts...)
|
hsURL.Path = path.Join(parts...)
|
||||||
// Manually add the trailing slash back to the end of the path if it's explicitely needed
|
// Manually add the trailing slash back to the end of the path if it's explicitly needed
|
||||||
if strings.HasSuffix(urlPath[len(urlPath)-1], "/") {
|
if strings.HasSuffix(urlPath[len(urlPath)-1], "/") {
|
||||||
hsURL.Path = hsURL.Path + "/"
|
hsURL.Path = hsURL.Path + "/"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue