mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-10-31 16:00:05 -04:00
gnucash: Ensure error is properly checked
This commit is contained in:
parent
d9ecaa530b
commit
7a23739a0b
@ -344,8 +344,8 @@ func GnucashImportHandler(r *http.Request, context *Context) ResponseWriterWrite
|
||||
// Does this look like a gzipped file?
|
||||
var gnucashImport *GnucashImport
|
||||
if gzHeader[0] == 0x1f && gzHeader[1] == 0x8b {
|
||||
gzr, err := gzip.NewReader(bufread)
|
||||
if err != nil {
|
||||
gzr, err2 := gzip.NewReader(bufread)
|
||||
if err2 != nil {
|
||||
log.Print(err)
|
||||
return NewError(999 /*Internal Error*/)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user