mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Fix error check logic
If copy finished file (err == nil) then use the error returned from out.Close()
This commit is contained in:
parent
1fa20301a0
commit
b75ea1b052
@ -171,7 +171,7 @@ func copyFile(src, dst string) (err error) {
|
||||
}
|
||||
defer func() {
|
||||
cerr := out.Close()
|
||||
if cerr == nil {
|
||||
if err == nil {
|
||||
err = cerr
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user