mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
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:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user