From 5f176af1e8101d9bb55c11361b9878f8516bba72 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 18 Feb 2025 10:45:29 +0800 Subject: [PATCH] ssh_server.go: Don't use path.Join for config.HTTP.Root --- ssh_server.go | 3 +-- diff --git a/ssh_server.go b/ssh_server.go index a9aeea8321673ef4421f469d391c705f5b58ab29..1630babdc6661b9181f31102d2ad445bb649042a 100644 --- a/ssh_server.go +++ b/ssh_server.go @@ -4,7 +4,6 @@ import ( "fmt" "net" "os" - "path" "strings" glider_ssh "github.com/gliderlabs/ssh" @@ -42,7 +41,7 @@ client_public_key_string = strings.TrimSuffix(string(go_ssh.MarshalAuthorizedKey(client_public_key)), "\n") } clog.Info("Incoming SSH: " + session.RemoteAddr().String() + " " + client_public_key_string + " " + session.RawCommand()) - fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+path.Join(config.HTTP.Root, "/:/source/\r")) + fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/") + "/:/source/\r") cmd := session.Command() -- 2.48.1