From 3f6d61f2ef05dcef3e01a9a98e43285b3338e397 Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 27 Jul 2023 03:25:45 -0500 Subject: [PATCH] add a comment clarifying why join is not used --- pkg/runner/commands.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/runner/commands.go b/pkg/runner/commands.go index 2296c7e5..ec71e721 100644 --- a/pkg/runner/commands.go +++ b/pkg/runner/commands.go @@ -133,6 +133,7 @@ func (ec *execCmd) Copy(ctx context.Context) (resp execCmdResp, err error) { // if sudo is set, we need to upload the file to a temporary directory and move it to the final destination tmpRemoteDir := ec.uniqueTmp(tmpRemoteDirPrefix) resp.details = fmt.Sprintf(" {copy: %s -> %s, sudo: true}", src, dst) + // not using filepath.Join because we want to keep the linux slash, see https://github.com/umputun/spot/issues/144 tmpDest := tmpRemoteDir + "/" + filepath.Base(dst) // upload to a temporary directory with mkdir