builder/vmware: make upload dst,src like normal go

This commit is contained in:
Mitchell Hashimoto 2013-11-07 20:47:15 -08:00
parent 2c8843b4de
commit 148d7c06ab
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func (d *ESX5Driver) Stop(vmxPathLocal string) error {
func (d *ESX5Driver) Register(vmxPathLocal string) error { func (d *ESX5Driver) Register(vmxPathLocal string) error {
vmxPath := d.datastorePath(vmxPathLocal) vmxPath := d.datastorePath(vmxPathLocal)
if err := d.upload(vmxPathLocal, vmxPath); err != nil { if err := d.upload(vmxPath, vmxPathLocal); err != nil {
return err return err
} }
return d.sh("vim-cmd", "solo/registervm", vmxPath) return d.sh("vim-cmd", "solo/registervm", vmxPath)
@ -279,7 +279,7 @@ func (d *ESX5Driver) checkGuestIPHackEnabled() error {
return nil return nil
} }
func (d *ESX5Driver) upload(src, dst string) error { func (d *ESX5Driver) upload(dst, src string) error {
f, err := os.Open(src) f, err := os.Open(src)
if err != nil { if err != nil {
return err return err