provisioner/salt-masterless: join paths properly

This commit is contained in:
Mitchell Hashimoto 2013-08-30 14:25:51 -07:00
parent 5d8a211774
commit 7ed2498407
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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
}