packer-community / winrmcp

Copy files to a remote host using WinRM
MIT License
59 stars 31 forks source link

The first subdirectory of a folder upload is truncated when using relative paths #2

Closed mefellows closed 9 years ago

mefellows commented 9 years ago

Given the current working dir

~/go/src/github.com/packer-community/winrmcp

and a sub-directory

DSC/Index_files/foo/bar

the command

`bin/winrmcp -user=vagrant -pass=vagrant ./DSC c:/DSC`

will result in the following errant upload path:

c:/DSC/ex_files/foo/bar

I believe the root cause of this to be line 72 of winrmcp.go which fails to take into consideration.

mefellows commented 9 years ago

Fixed, build passing (and also Tested in a Packer run).

dylanmei commented 9 years ago

Awesome thanks!