Skip to content

Commit

Permalink
Fix copy of the URL in RemoteName (#1044)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Maury <pub-gitea@x-cli.eu>
  • Loading branch information
X-Cli and Florian Maury authored Nov 3, 2023
1 parent 6bf5862 commit 49ba899
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libvirt/uri/connection_uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ func Parse(uriStr string) (*ConnectionURI, error) {
// The name passed to the remote virConnectOpen function is formed by removing
// transport, hostname, port number, username and extra parameters from the remote URI
// unless the name option is specified.
func (u *ConnectionURI) RemoteName() string {
func (u ConnectionURI) RemoteName() string {
q := u.Query()
if name := q.Get("name"); name != "" {
return name
}

newURI := *u
newURI := *u.URL
newURI.Scheme = u.driver()
newURI.User = nil
newURI.Host = ""
Expand Down

0 comments on commit 49ba899

Please sign in to comment.