AliyunContainerService / pouch

An Efficient Enterprise-class Container Engine
https://pouchcontainer.io
Apache License 2.0
4.64k stars 949 forks source link

fix: not copy parent dir when path contains dot #2920

Closed ZYecho closed 4 years ago

ZYecho commented 5 years ago

Signed-off-by: zhangyue zy675793960@yeah.net

Ⅰ. Describe what this PR did

when path contains dot, such as test/. , we should not copy the test dir into dst, we just need to copy the file& dir under test/ into dst.

Ⅱ. Does this pull request fix one issue?

None.

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

added.

Ⅳ. Describe how to verify it

wait for CI.

Ⅴ. Special notes for reviews

None.

codecov[bot] commented 5 years ago

Codecov Report

Merging #2920 into master will decrease coverage by 0.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2920      +/-   ##
==========================================
- Coverage   68.23%   68.11%   -0.13%     
==========================================
  Files         291      291              
  Lines       18328    18329       +1     
==========================================
- Hits        12506    12484      -22     
- Misses       4368     4379      +11     
- Partials     1454     1466      +12
Flag Coverage Δ
#criv1alpha2_test 34.74% <0%> (-0.09%) :arrow_down:
#integration_test_0 36.08% <0%> (+0.01%) :arrow_up:
#integration_test_1 35.5% <100%> (-0.01%) :arrow_down:
#integration_test_2 35.93% <0%> (-0.11%) :arrow_down:
#integration_test_3 35.64% <100%> (ø) :arrow_up:
#node_e2e_test 34.21% <0%> (-0.15%) :arrow_down:
#unittest 27.98% <0%> (-0.01%) :arrow_down:
Impacted Files Coverage Δ
daemon/mgr/container_copy.go 57.73% <100%> (+0.25%) :arrow_up:
cri/ocicni/netns.go 58.1% <0%> (-2.71%) :arrow_down:
ctrd/container.go 51.62% <0%> (-2.68%) :arrow_down:
daemon/mgr/container.go 59.1% <0%> (-1.25%) :arrow_down:
cri/v1alpha2/cri.go 63.78% <0%> (-0.26%) :arrow_down:
daemon/mgr/container_utils.go 76.76% <0%> (+0.5%) :arrow_up:
apis/server/utils.go 75% <0%> (+3.84%) :arrow_up:
ctrd/watch.go 78.37% <0%> (+5.4%) :arrow_up:
CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zhangyue seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.