hnakamur / go-scp

[Unmaintained] A scp client library written in Go
MIT License
41 stars 23 forks source link

SendDir behavour inconsistent with scp -r #3

Closed fugr closed 7 years ago

fugr commented 7 years ago

example: ➜ scplib git:(DBaaSWithoutSAN) ✗ tree . ├── scp.go └── scp_test.go

0 directories, 2 files

$ scp -P 2222 -r scplib vagrant@127.0.0.1:/tmp got: ➜ /tmp tree . -- scplib |-- scp.go `-- scp_test.go

1 directory, 2 files

but use go-scp got this: === RUN TestUploadDir --- PASS: TestUploadDir (10.45s) scp_test.go:180: upload dir:/Users/fugr/gocode/src/github.com/docker/swarm/scplib to /tmp PASS ok github.com/docker/swarm/scplib 10.466s ➜ /tmp tree . |-- scp.go `-- scp_test.go

0 directories, 2 files

fugr commented 7 years ago

@hnakamur is there something i missed?

hnakamur commented 7 years ago

@fugr Sorry for being late. I've been busy for other things. Thanks for your bug report! I added test cases for this bug. Fix for cases when destination directory does not exist by hnakamur · Pull Request #4 · hnakamur/go-scp I'll try to fix this soon.

hnakamur commented 7 years ago

@fugr Fixed. Thanks!