Dont ignore close error

This commit is contained in:
Kovid Goyal 2023-07-25 07:03:08 +05:30
parent 50b146bb04
commit ecf451dd56
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -216,7 +216,10 @@ func (self *remote_file) write_data(data []byte, is_last bool) (amt_written int6
}
amt_written = pos - base
if is_last && self.actual_file != nil {
self.actual_file.close()
cerr := self.actual_file.close()
if err == nil {
err = cerr
}
self.actual_file = nil
}
return