Check for errors on forget after having backuped (#241)

This commit is contained in:
Romain de Laage 2022-10-17 15:02:47 +02:00 committed by GitHub
parent 874ed52e3b
commit 3732dcf6ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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 {