Update to 7-Zip 16.03

This commit is contained in:
Tino Reichardt
2016-09-29 20:02:18 +02:00
parent a2f0a60c42
commit 0e6c1206d2
87 changed files with 1201 additions and 386 deletions

View File

@@ -244,9 +244,31 @@ HRESULT CHandler::Open2(IInStream *stream)
_items.Add(item);
}
UInt64 end = (backupLba + 1) * kSectorSize;
if (_totalSize < end)
_totalSize = end;
{
const UInt64 end = (backupLba + 1) * kSectorSize;
if (_totalSize < end)
_totalSize = end;
}
{
UInt64 fileEnd;
RINOK(stream->Seek(0, STREAM_SEEK_END, &fileEnd));
if (_totalSize < fileEnd)
{
const UInt64 rem = fileEnd - _totalSize;
const UInt64 kRemMax = 1 << 22;
if (rem <= kRemMax)
{
RINOK(stream->Seek(_totalSize, STREAM_SEEK_SET, NULL));
bool areThereNonZeros = false;
UInt64 numZeros = 0;
if (ReadZeroTail(stream, areThereNonZeros, numZeros, kRemMax) == S_OK)
if (!areThereNonZeros)
_totalSize += numZeros;
}
}
}
return S_OK;
}