From 0a396503329e074e6f17c54ccf40ed0440686fca Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 12 Aug 2013 17:10:50 -0700 Subject: [PATCH] provisioner/salt-masterless: switch replace to that prior replace works /cc @markpeek --- provisioner/salt-masterless/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index 1c82ce070..67cd2a8dd 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -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