prune: return proper error if blob cannot be found

This commit is contained in:
Michael Eischer 2025-11-16 17:04:03 +01:00
parent 3b854d9c04
commit 0ff3e20c4b

View file

@ -300,5 +300,10 @@ func getUsedBlobs(ctx context.Context, repo restic.Repository, usedBlobs restic.
bar.SetMax(uint64(len(snapshotTrees)))
defer bar.Done()
return data.FindUsedBlobs(ctx, repo, snapshotTrees, usedBlobs, bar)
err = data.FindUsedBlobs(ctx, repo, snapshotTrees, usedBlobs, bar)
if err != nil {
return errors.Fatalf("failed finding blobs: %v", err)
}
return nil
}