Make BlobHandle substruct of Blob

This commit is contained in:
Alexander Weiss
2020-11-22 20:41:10 +01:00
committed by Alexander Neumann
parent c844580e0f
commit 92bd448691
8 changed files with 67 additions and 43 deletions
+2 -2
View File
@@ -231,7 +231,7 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB
// iterate over all blobs in index to find out which blobs are duplicates
for blob := range repo.Index().Each(ctx) {
bh := blob.Handle()
bh := blob.BlobHandle
size := uint64(blob.Length)
switch {
case usedBlobs.Has(bh): // used blob, move to keepBlobs
@@ -280,7 +280,7 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB
ip.tpe = restic.InvalidBlob
}
bh := blob.Handle()
bh := blob.BlobHandle
size := uint64(blob.Length)
switch {
case duplicateBlobs.Has(bh): // duplicate blob