terraform
terraform copied to clipboard
communicator/ssh: fix Upload to avoid copying files to determine size
The optimization not to copy instances of *os.File in Upload does not work due to wrong error handling. This PR fixes the issue. I have also piggybacked a change in the type switch to handle anything that can report length or os stats.