fix: fixed image size not counting config and manifest sizes (#937)

Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com>
This commit is contained in:
Lisca Ana-Roberta
2022-11-04 19:27:34 +02:00
committed by GitHub
parent 4170d2adbc
commit eb722905cb
2 changed files with 21 additions and 12 deletions
+9
View File
@@ -290,6 +290,15 @@ func (p *requestsPool) doJob(ctx context.Context, job *manifestJob) {
)
}
size += uint64(job.manifestResp.Config.Size)
manifestSize, err := strconv.Atoi(header.Get("Content-Length"))
if err != nil {
p.outputCh <- stringResult{"", err}
}
size += uint64(manifestSize)
image := &imageStruct{}
image.verbose = *job.config.verbose
image.RepoName = job.imageName