From 3732dcf6ff0bf7ef69762b95245748e1c5dcfa98 Mon Sep 17 00:00:00 2001 From: Romain de Laage Date: Mon, 17 Oct 2022 15:02:47 +0200 Subject: [PATCH] Check for errors on forget after having backuped (#241) --- internal/location.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/location.go b/internal/location.go index d4c73e7..bf8deb5 100644 --- a/internal/location.go +++ b/internal/location.go @@ -308,7 +308,10 @@ after: // Forget and optionally prune if isSuccess && l.ForgetOption != "" && l.ForgetOption != LocationForgetNo { - l.Forget(l.ForgetOption == LocationForgetPrune, false) + err := l.Forget(l.ForgetOption == LocationForgetPrune, false) + if err != nil { + errors = append(errors, err) + } } if len(errors) == 0 {