Skip to content

Commit 3f9807a

Browse files
Merge pull request #12634 from csrwng/clusterup_fixwindows
cluster up: fix Windows config file upload
2 parents ff3dbfc + dd1a028 commit 3f9807a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/bootstrap/docker/dockerhelper/filetransfer.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"io"
77
"io/ioutil"
88
"os"
9+
"path"
910
"path/filepath"
1011
"strings"
1112

@@ -122,12 +123,12 @@ func DownloadDirFromContainer(client *docker.Client, container, src, dst string)
122123

123124
// UploadFileToContainer uploads a file to a remote container.
124125
func UploadFileToContainer(client *docker.Client, container, src, dest string) error {
125-
uploader, errch := newContainerUploader(client, container, filepath.Dir(dest))
126+
uploader, errch := newContainerUploader(client, container, path.Dir(dest))
126127

127128
nullWalkFunc := func(path string, info os.FileInfo, err error) error { return err }
128129

129130
t := stitar.New()
130-
err := t.StreamFileAsTarWithCallback(src, filepath.Base(dest), uploader, nullWalkFunc, false)
131+
err := t.StreamFileAsTarWithCallback(src, path.Base(dest), uploader, nullWalkFunc, false)
131132
uploader.Close()
132133
if err != nil {
133134
return err

0 commit comments

Comments
 (0)