MCPcopy Index your code
hub / github.com/kopia/kopia / run

Method run

cli/command_snapshot_fix_invalid_files.go:47–66  ·  view source on GitHub ↗
(ctx context.Context, rep repo.RepositoryWriter)

Source from the content-addressed store, hash-verified

45}
46
47func (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}

Callers

nothing calls this directly

Calls 5

ReadBlobMapFunction · 0.92
NewVerifierFunction · 0.92
failedEntryCallbackFunction · 0.85
BlobReaderMethod · 0.65

Tested by

no test coverage detected