Not sure why this code has been here forever, but it was wrong. If the compressed file was exact the same size as the extracted file then we'd never extract it? Why? IDK, it's bad, and I should feel bad. (#2487)

This commit is contained in:
Timothy Baldridge 2024-01-15 16:35:23 -07:00 committed by GitHub
parent ab12bad74a
commit f16f27a22b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ public class FileRecord : IFile
if (BSA.HeaderType == VersionType.SSE)
{
if (Compressed && size.Size != size.OnDisk)
if (Compressed)
{
await using var r = LZ4Stream.Decode(rdr.BaseStream);
await r.CopyToLimitAsync(output, (int) size.Original, token).ConfigureAwait(false);