Files
kubernetes/pkg/kubectl
Kubernetes Submit Queue d042a1d7d1 Merge pull request #51595 from WanLinghao/kubectl_cp_error
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

fix kubectl cp command error

fix kubectl cp command error.

modified:   pkg/kubectl/cmd/cp.go



**What this PR does / why we need it**:
fix kubectl cp error.
it happens when copy directory to pod and the directory path ends with '/'.
for example:
kubectl cp /tmp/test/ test-pod:/tmp/test/
it will fail with 
error: stat /tmp/test/test: no such file or directory

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-09-23 08:09:54 -07:00
..
2017-08-31 23:31:12 -07:00
2017-09-07 19:41:24 +02:00
2017-06-22 11:31:03 -07:00
2017-06-22 11:31:03 -07:00
2017-08-31 19:11:01 -04:00
2017-01-20 08:04:53 -05:00
2017-06-03 14:35:49 +08:00
2017-01-11 09:09:48 -05:00
2017-01-25 17:32:22 -08:00
2017-07-23 02:12:53 +08:00
2017-01-11 09:09:48 -05:00
2017-08-09 10:37:03 +08:00
2017-01-11 09:09:48 -05:00
2017-06-22 11:31:03 -07:00