provisioner/salt-masterless: switch replace to that prior replace works

/cc @markpeek
This commit is contained in:
Mitchell Hashimoto 2013-08-12 17:10:50 -07:00
parent 1fd5937839
commit 0a39650332
1 changed files with 1 additions and 1 deletions

View File

@ -136,8 +136,8 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
func UploadLocalDirectory(localDir string, remoteDir string, comm packer.Communicator, ui packer.Ui) (err error) {
visitPath := func(localPath string, f os.FileInfo, err error) (err2 error) {
localPath = strings.Replace(localPath, "\\", "/", -1)
localRelPath := strings.Replace(localPath, localDir, "", 1)
localRelPath = strings.Replace(localRelPath, "\\", "/", -1)
remotePath := fmt.Sprintf("%s%s", remoteDir, localRelPath)
if f.IsDir() && f.Name() == ".git" {
return filepath.SkipDir