mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:44: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:
@ -11,7 +11,8 @@ func SyncDir(dir string) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("open directory: %v", err)
|
||||
}
|
||||
xerr := d.Sync()
|
||||
d.Close()
|
||||
return xerr
|
||||
err = d.Sync()
|
||||
xerr := d.Close()
|
||||
xlog.Check(xerr, "closing directory after sync")
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user