Fix strange edge-case with BSA extraction

This commit is contained in:
Timothy Baldridge 2020-09-09 14:40:28 -06:00
parent ab5010594f
commit 16041170d2
4 changed files with 4 additions and 5 deletions

View File

@ -86,7 +86,7 @@ namespace Compression.BSA
if (BSA.HeaderType == VersionType.SSE)
{
if (Compressed)
if (Compressed && size.Size != size.OnDisk)
{
using var r = LZ4Stream.Decode(rdr.BaseStream);
await r.CopyToLimitAsync(output, size.Original).ConfigureAwait(false);

View File

@ -20,7 +20,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Genbox.AlphaFS" Version="2.2.2.1" />
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.2.5" />
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.2.4-alpha" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0-preview.8.20407.11" />
</ItemGroup>

View File

@ -329,6 +329,7 @@ namespace Wabbajack.Common
{
await using var fs = await Create();
await data.CopyToAsync(fs);
await data.FlushAsync();
if (disposeDataAfter) await data.DisposeAsync();
}

View File

@ -17,9 +17,7 @@
<Version>3.1.0</Version>
</PackageReference>
<PackageReference Include="Fody">
<Version>6.2.5</Version>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<Version>6.2.4</Version>
</PackageReference>
<PackageReference Include="Genbox.AlphaFS">
<Version>2.2.2.1</Version>