mirror of
https://github.com/restic/restic.git
synced 2025-12-31 02:16:27 +00:00
@@ -386,7 +386,7 @@ func loadBlobs(ctx context.Context, repo restic.Repository, pack restic.ID, list
|
||||
}
|
||||
}
|
||||
if reuploadBlobs {
|
||||
_, _, err := repo.SaveBlob(ctx, blob.Type, plaintext, id, true)
|
||||
_, _, _, err := repo.SaveBlob(ctx, blob.Type, plaintext, id, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -130,11 +130,11 @@ func runStats(gopts GlobalOptions, args []string) error {
|
||||
if statsOptions.countMode == countModeRawData {
|
||||
// the blob handles have been collected, but not yet counted
|
||||
for blobHandle := range stats.blobs {
|
||||
blobSize, found := repo.LookupBlobSize(blobHandle.ID, blobHandle.Type)
|
||||
if !found {
|
||||
pbs := repo.Index().Lookup(blobHandle)
|
||||
if len(pbs) == 0 {
|
||||
return fmt.Errorf("blob %v not found", blobHandle)
|
||||
}
|
||||
stats.TotalSize += uint64(blobSize)
|
||||
stats.TotalSize += uint64(pbs[0].Length)
|
||||
stats.TotalBlobCount++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user