Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copy file without mode #844

Merged
merged 4 commits into from
Oct 19, 2020
Merged

Fix copy file without mode #844

merged 4 commits into from
Oct 19, 2020

Conversation

lucklove
Copy link
Member

Signed-off-by: lucklove gnu.crazier@gmail.com

What problem does this PR solve?

We copy file with tiuputils.CopyFile, which is dup with tiuputils.Copy and both of them forget to change the mode of created file.

What is changed and how it works?

call os.Chmod after create target.

Check List

Tests

  • Unit test

Release notes:

NONE

Signed-off-by: lucklove <gnu.crazier@gmail.com>
@lucklove lucklove self-assigned this Oct 16, 2020
@lucklove lucklove added the type/bug-fix Categorizes PR as a bug-fix label Oct 16, 2020
@lucklove lucklove added this to the v1.2.1 milestone Oct 16, 2020
@codecov-io
Copy link

codecov-io commented Oct 16, 2020

Codecov Report

Merging #844 into master will increase coverage by 23.55%.
The diff coverage is 37.50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #844       +/-   ##
===========================================
+ Coverage   25.51%   49.06%   +23.55%     
===========================================
  Files         244      261       +17     
  Lines       17608    18995     +1387     
===========================================
+ Hits         4492     9320     +4828     
+ Misses      12462     8205     -4257     
- Partials      654     1470      +816     
Flag Coverage Δ
#cluster 39.20% <25.00%> (?)
#dm 25.29% <33.33%> (?)
#integrate 43.82% <25.00%> (+26.51%) ⬆️
#playground 22.22% <40.00%> (+0.05%) ⬆️
#tiup 10.80% <40.00%> (+0.02%) ⬆️
#unittest 20.87% <37.50%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/cluster/command/import.go 18.07% <0.00%> (ø)
pkg/cluster/manager.go 59.13% <0.00%> (+58.04%) ⬆️
pkg/utils/ioutil.go 47.57% <50.00%> (+10.40%) ⬆️
pkg/localdata/profile.go 39.10% <100.00%> (+1.67%) ⬆️
pkg/utils/mock/mock.go 7.69% <0.00%> (-0.31%) ⬇️
pkg/cluster/operation/scale_in.go 52.08% <0.00%> (ø)
pkg/logger/logger.go 100.00% <0.00%> (ø)
pkg/cluster/operation/action.go 49.65% <0.00%> (ø)
pkg/cluster/operation/download.go 36.84% <0.00%> (ø)
pkg/cluster/operation/telemetry.go 0.00% <0.00%> (ø)
... and 155 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fc2fb9...a6bbd1a. Read the comment docs.

Signed-off-by: lucklove <gnu.crazier@gmail.com>
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 17, 2020
@lucklove lucklove merged commit 3dcd09b into pingcap:master Oct 19, 2020
lucklove added a commit that referenced this pull request Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1. type/bug-fix Categorizes PR as a bug-fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants