mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +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{
|
return CacheEntryValue{
|
||||||
Object: file.RBACObject(),
|
Object: file.RBACObject(),
|
||||||
FS: archivefs.FromTarReader(content),
|
FS: archivefs.FromTarReader(content),
|
||||||
Size: int64(content.Len()),
|
Size: int64(len(file.Data)),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user