1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-25 23:23:21 -05:00

gnucash: Ensure error is properly checked

This commit is contained in:
Aaron Lindsay 2017-11-25 21:05:57 -05:00
parent d9ecaa530b
commit 7a23739a0b

View File

@ -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*/)
}