fix: set fileSize to full length instead of unread portion (#18409)

`content.Len()` would return `0` bytes after a file was fully read.
Since the buffer `Len` function returns the length of the unread
portion.
This commit is contained in:
Steven Masley
2025-06-17 10:57:34 -05:00
committed by GitHub
parent 7fa1ad8923
commit aee96c9eac

View File

@ -35,7 +35,7 @@ func NewFromStore(store database.Store, registerer prometheus.Registerer, authz
return CacheEntryValue{
Object: file.RBACObject(),
FS: archivefs.FromTarReader(content),
Size: int64(content.Len()),
Size: int64(len(file.Data)),
}, nil
}