Commit 404ae53a authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

provisioner/salt-masterless: join paths properly

parent 4d42c79d
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
BUG FIXES: BUG FIXES:
* core: Fix possible panic when ctrl-C during provisioner run. * 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) ## 0.3.5 (August 28, 2013)
......
...@@ -204,7 +204,7 @@ func UploadLocalDirectory(localDir string, remoteDir string, comm packer.Communi ...@@ -204,7 +204,7 @@ func UploadLocalDirectory(localDir string, remoteDir string, comm packer.Communi
visitPath := func(localPath string, f os.FileInfo, err error) (err2 error) { visitPath := func(localPath string, f os.FileInfo, err error) (err2 error) {
localRelPath := strings.Replace(localPath, localDir, "", 1) localRelPath := strings.Replace(localPath, localDir, "", 1)
localRelPath = strings.Replace(localRelPath, "\\", "/", -1) localRelPath = strings.Replace(localRelPath, "\\", "/", -1)
remotePath := fmt.Sprintf("%s%s", remoteDir, localRelPath) remotePath := filepath.Join(remoteDir, localRelPath)
if f.IsDir() && f.Name() == ".git" { if f.IsDir() && f.Name() == ".git" {
return filepath.SkipDir return filepath.SkipDir
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment