restore: add deletions to progress output

This commit is contained in:
Michael Eischer
2024-06-29 21:29:42 +02:00
parent f4b15fdd96
commit aa8e18cf32
8 changed files with 24 additions and 3 deletions

View File

@@ -499,6 +499,7 @@ func (res *Restorer) removeUnexpectedFiles(target, location string, expectedFile
selectedForRestore, _ := res.SelectFilter(nodeLocation, false)
// only delete files that were selected for restore
if selectedForRestore {
res.opts.Progress.ReportDeletedFile(nodeLocation)
if !res.opts.DryRun {
if err := fs.RemoveAll(nodeTarget); err != nil {
return err