Skip to content

Commit

Permalink
cluster up: fix Windows config file upload
Browse files Browse the repository at this point in the history
Uses the path (unix-style) package instead of filepath (platform-specific)
for creating the config file upload path for the origin container.
  • Loading branch information
csrwng committed Jan 24, 2017
1 parent ff3dbfc commit dd1a028
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/bootstrap/docker/dockerhelper/filetransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"

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

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

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

t := stitar.New()
err := t.StreamFileAsTarWithCallback(src, filepath.Base(dest), uploader, nullWalkFunc, false)
err := t.StreamFileAsTarWithCallback(src, path.Base(dest), uploader, nullWalkFunc, false)
uploader.Close()
if err != nil {
return err
Expand Down

0 comments on commit dd1a028

Please sign in to comment.