mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 15:14:59 -06:00
4.55 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
b82f80647d
commit
b67ffe691b
@@ -91,6 +91,7 @@ HRESULT DecompressArchives(
|
||||
CExtractOptions options = optionsSpec;
|
||||
int i;
|
||||
UInt64 totalPackSize = 0;
|
||||
CRecordVector<UInt64> archiveSizes;
|
||||
for (i = 0; i < archivePaths.Size(); i++)
|
||||
{
|
||||
const UString &archivePath = archivePaths[i];
|
||||
@@ -99,6 +100,7 @@ HRESULT DecompressArchives(
|
||||
throw "there is no such archive";
|
||||
if (archiveFileInfo.IsDirectory())
|
||||
throw "can't decompress folder";
|
||||
archiveSizes.Add(archiveFileInfo.Size);
|
||||
totalPackSize += archiveFileInfo.Size;
|
||||
}
|
||||
CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback;
|
||||
@@ -145,8 +147,15 @@ HRESULT DecompressArchives(
|
||||
{
|
||||
archivePaths.Delete(index);
|
||||
archivePathsFull.Delete(index);
|
||||
totalPackSize -= archiveSizes[index];
|
||||
archiveSizes.Delete(index);
|
||||
}
|
||||
}
|
||||
if (archiveLink.VolumePaths.Size() != 0)
|
||||
{
|
||||
totalPackSize += archiveLink.VolumesSize;
|
||||
RINOK(extractCallback->SetTotal(totalPackSize));
|
||||
}
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
UString password;
|
||||
@@ -160,7 +169,7 @@ HRESULT DecompressArchives(
|
||||
options.DefaultItemName = archiveLink.GetDefaultItemName();
|
||||
RINOK(DecompressArchive(
|
||||
archiveLink.GetArchive(),
|
||||
archiveFileInfo.Size,
|
||||
archiveFileInfo.Size + archiveLink.VolumesSize,
|
||||
archiveLink.GetDefaultItemName(),
|
||||
wildcardCensor, options, extractCallback, extractCallbackSpec, errorMessage));
|
||||
extractCallbackSpec->LocalProgressSpec->InSize += archiveFileInfo.Size +
|
||||
|
||||
Reference in New Issue
Block a user