Closed fugr closed 7 years ago
Thanks for your pull request, but my understanding is that scp
does not change behavior whether the destination path has the trailing slash or not.
There is no mention about trailing slash at http://manpages.ubuntu.com/manpages/xenial/en/man1/scp.1.html
Also I tested scp -r
with destination paths with or without a trailing slash, and I confirmed the result was the same.
rsync
does change its behavior for the source path with the trailing slash.
http://manpages.ubuntu.com/manpages/xenial/en/man1/rsync.1.html
I want go-scp
to be compatible with scp
, so I'm afraid I cannot merge this pull request.
open new issue #3
If trailing slash(end with '/'), so only upload the contents,if else, creating the source directory name first.
send dir A/B/C to /destDir by scp,result with /destDir/C. this PR seems works,maybe pretty way to do this.