(ctx context.Context, rep repo.RepositoryWriter)
| 45 | } |
| 46 | |
| 47 | func (c *commandSnapshotFixInvalidFiles) run(ctx context.Context, rep repo.RepositoryWriter) error { |
| 48 | c.failedFileCallback = failedEntryCallback(rep, c.invalidFileHandling) |
| 49 | |
| 50 | opts := snapshotfs.VerifierOptions{ |
| 51 | VerifyFilesPercent: c.verifyFilesPercent, |
| 52 | } |
| 53 | |
| 54 | if dr, ok := rep.(repo.DirectRepository); ok { |
| 55 | blobMap, err := blob.ReadBlobMap(ctx, dr.BlobReader()) |
| 56 | if err != nil { |
| 57 | return errors.Wrap(err, "unable to read blob map") |
| 58 | } |
| 59 | |
| 60 | opts.BlobMap = blobMap |
| 61 | } |
| 62 | |
| 63 | c.verifier = snapshotfs.NewVerifier(ctx, rep, opts) |
| 64 | |
| 65 | return c.common.rewriteMatchingSnapshots(ctx, rep, c.rewriteEntry) |
| 66 | } |
nothing calls this directly
no test coverage detected