net-ssh / net-scp

Pure Ruby implementation of the SCP protocol
http://github.com/delano/net-scp
MIT License
154 stars 63 forks source link

scp.upload fails if there is a directory symlinked into the local path #35

Open atheiman opened 7 years ago

atheiman commented 7 years ago

Given this code:

ssh.scp.upload('/local/path', '/remote/path', recursive: true)

It looks like if there is a symlink at /local/path/symlink pointing to another directory on the local filesystem, scp upload fails.

this was discovered in https://github.com/test-kitchen/test-kitchen/issues/1319. In that issue there is a test-kitchen output that shows the scp failure, but I don't yet have a clean example outside of test-kitchen.

LeoSnets commented 6 years ago

I am running into the same issue. Is there a work around?

atheiman commented 6 years ago

@LeoSnets you might try net-sftp, but no I have not found a workaround for this. I assume the code fix wouldn’t be too bad, but I haven’t looked.