This commit is contained in:
Lars Vahlenberg
2022-08-04 21:24:27 +02:00
2 changed files with 8 additions and 4 deletions

View File

@@ -144,9 +144,15 @@ namespace SharpCompress.IO
if (!IsVolumes && count != 0 && Current.Position == Current.Length)
{
var length = Current.Length;
if (!SetStream(_stream + 1)) //will load next file if present
// Load next file if present
if (!SetStream(_stream + 1))
{
break;
}
// Current stream switched
// Add length of previous stream
_prevSize += length;
Current.Seek(0, SeekOrigin.Begin);
}

View File

@@ -170,10 +170,8 @@ namespace SharpCompress
byte[] buffer = GetTransferByteArray();
try
{
var pos = source.Position;
int count = 0;
var len = source.Read(buffer, 0, buffer.Length);
source.Position = pos + len;
do
{