diff --git a/CHANGELOG.md b/CHANGELOG.md index f311e5441..26e5b07ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ BUG FIXES: * core: Fix possible panic when ctrl-C during provisioner run. +* provisioners/salt-masterless: Use filepath join to properly join paths. ## 0.3.5 (August 28, 2013) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index 0dd359dad..24d29097c 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -204,7 +204,7 @@ func UploadLocalDirectory(localDir string, remoteDir string, comm packer.Communi visitPath := func(localPath string, f os.FileInfo, err error) (err2 error) { localRelPath := strings.Replace(localPath, localDir, "", 1) localRelPath = strings.Replace(localRelPath, "\\", "/", -1) - remotePath := fmt.Sprintf("%s%s", remoteDir, localRelPath) + remotePath := filepath.Join(remoteDir, localRelPath) if f.IsDir() && f.Name() == ".git" { return filepath.SkipDir }