diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index f334a1af2..f4fe5f7db 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -414,12 +414,12 @@ func (arch *Archiver) Save(ctx context.Context, snPath, target string, previous _ = file.Close() return fn, false, nil - } else { - debug.Log("%v hasn't changed, but contents are missing!", target) - // There are contents missing - inform user! - err := errors.Errorf("parts of %v not found in the repository index; storing the file again", target) - arch.error(abstarget, fi, err) } + + debug.Log("%v hasn't changed, but contents are missing!", target) + // There are contents missing - inform user! + err := errors.Errorf("parts of %v not found in the repository index; storing the file again", target) + arch.error(abstarget, fi, err) } fn.isFile = true diff --git a/internal/ui/json/backup.go b/internal/ui/json/backup.go index ff7af18c4..9380422b9 100644 --- a/internal/ui/json/backup.go +++ b/internal/ui/json/backup.go @@ -230,10 +230,10 @@ func (b *Backup) CompleteItem(item string, previous, current *restic.Node, s arc done: true, } return - } else { - b.summary.ProcessedBytes += current.Size } + b.summary.ProcessedBytes += current.Size + switch current.Type { case "file": b.processedCh <- counter{Files: 1}