Improve error reporting on recovery errors

This commit is contained in:
James Mills 2021-07-14 22:59:51 +10:00
parent 947d15fed8
commit 52df2fad55
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

@ -27,7 +27,7 @@ func CheckAndRecover(path string, cfg *config.Config) error {
f := dfs[len(dfs)-1]
recovered, err := recoverDatafile(f, cfg)
if err != nil {
return fmt.Errorf("recovering data file")
return fmt.Errorf("error recovering data file: %s", err)
}
if recovered {
if err := os.Remove(filepath.Join(path, "index")); err != nil {