mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 14:24:37 +03:00
consistently use log.Check for logging errors that "should not happen", don't influence application flow
sooner or later, someone will notice one of these messages, which will lead us to a bug.
This commit is contained in:
@ -19,7 +19,8 @@ func CreateMessageTemp(pattern string) (*os.File, error) {
|
||||
}
|
||||
err = f.Chmod(0660)
|
||||
if err != nil {
|
||||
f.Close()
|
||||
xerr := f.Close()
|
||||
xlog.Check(xerr, "closing temp message file after chmod error")
|
||||
return nil, err
|
||||
}
|
||||
return f, err
|
||||
|
Reference in New Issue
Block a user